Skip to content

Commit 3a642d0

Browse files
Remove DefaultValue
1 parent 45adcdf commit 3a642d0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/CommunityToolkit.Maui/Behaviors/PlatformBehaviors/ImageTouch/ImageTouchBehavior.shared.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,42 @@ public partial class ImageTouchBehavior : TouchBehavior
1111
/// <summary>
1212
/// Gets or sets the <see cref="ImageSource"/> when <see cref="TouchState"/> is <see cref="TouchState.Default"/>.
1313
/// </summary>
14-
[BindableProperty(DefaultValue = ImageTouchBehaviorDefaults.DefaultBackgroundImageSource)]
15-
public partial ImageSource? DefaultImageSource { get; set; }
14+
[BindableProperty]
15+
public partial ImageSource? DefaultImageSource { get; set; } = (ImageSource?)ImageTouchBehaviorDefaults.DefaultBackgroundImageSource;
1616

1717
/// <summary>
1818
/// Gets or sets the <see cref="ImageSource"/> when the <see cref="HoverState"/> is <see cref="HoverState.Hovered"/>
1919
/// </summary>
20-
[BindableProperty(DefaultValue = ImageTouchBehaviorDefaults.HoveredBackgroundImageSource)]
21-
public partial ImageSource? HoveredImageSource { get; set; }
20+
[BindableProperty]
21+
public partial ImageSource? HoveredImageSource { get; set; } = (ImageSource?)ImageTouchBehaviorDefaults.HoveredBackgroundImageSource;
2222

2323
/// <summary>
2424
/// Gets or sets the <see cref="ImageSource"/> when the <see cref="TouchState"/> is <see cref="TouchState.Pressed"/>
2525
/// </summary>
26-
[BindableProperty(DefaultValue = ImageTouchBehaviorDefaults.PressedBackgroundImageSource)]
27-
public partial ImageSource? PressedImageSource { get; set; }
26+
[BindableProperty]
27+
public partial ImageSource? PressedImageSource { get; set; } = (ImageSource?)ImageTouchBehaviorDefaults.PressedBackgroundImageSource;
2828

2929
/// <summary>
3030
/// Gets or sets the <see cref="ImageSource"/> <see cref="Aspect"/> when <see cref="TouchState"/> is <see cref="TouchState.Default"/>.
3131
/// </summary>
32-
[BindableProperty(DefaultValue = ImageTouchBehaviorDefaults.DefaultBackgroundImageAspect)]
33-
public partial Aspect DefaultImageAspect { get; set; }
32+
[BindableProperty]
33+
public partial Aspect DefaultImageAspect { get; set; } = ImageTouchBehaviorDefaults.DefaultBackgroundImageAspect;
3434

3535
/// <summary>
3636
/// Gets or sets the <see cref="ImageSource"/> <see cref="Aspect"/> when <see cref="HoverState"/> is <see cref="HoverState.Hovered"/>.
3737
/// </summary>
38-
[BindableProperty(DefaultValue = ImageTouchBehaviorDefaults.HoveredBackgroundImageAspect)]
39-
public partial Aspect HoveredImageAspect { get; set; }
38+
[BindableProperty]
39+
public partial Aspect HoveredImageAspect { get; set; } = ImageTouchBehaviorDefaults.HoveredBackgroundImageAspect;
4040

4141
/// <summary>
4242
/// Gets or sets the <see cref="ImageSource"/> <see cref="Aspect"/> when the <see cref="TouchState"/> is <see cref="TouchState.Pressed"/>
4343
/// </summary>
44-
[BindableProperty(DefaultValue = ImageTouchBehaviorDefaults.PressedBackgroundImageAspect)]
45-
public partial Aspect PressedImageAspect { get; set; }
44+
[BindableProperty]
45+
public partial Aspect PressedImageAspect { get; set; } = ImageTouchBehaviorDefaults.PressedBackgroundImageAspect;
4646

4747
/// <summary>
4848
/// Gets or sets a value indicating whether the image should be set when the animation ends.
4949
/// </summary>
50-
[BindableProperty(DefaultValue = ImageTouchBehaviorDefaults.ShouldSetImageOnAnimationEnd)]
51-
public partial bool ShouldSetImageOnAnimationEnd { get; set; }
50+
[BindableProperty]
51+
public partial bool ShouldSetImageOnAnimationEnd { get; set; } = ImageTouchBehaviorDefaults.ShouldSetImageOnAnimationEnd;
5252
}

0 commit comments

Comments
 (0)