Skip to content

Commit

Permalink
Merge pull request #1056 from unoplatform/dev/xygu/20240229/drawer-ad…
Browse files Browse the repository at this point in the history
…p-crash

fix(drawer): attached property crash
  • Loading branch information
Xiaoy312 committed Feb 29, 2024
2 parents a745611 + 4501bd8 commit d2952e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions build/workflow/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"version": "0.2",
"language": "en",
"words": [
"autoplay",
"Avalonia",
"ambiently",
"binlog",
Expand Down
1 change: 0 additions & 1 deletion doc/helpers/StatusBar-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Provides two attached properties on `Page` to control the visuals of the status
</iframe>
</div>


## Remarks

The attached properties do nothing on platforms other than iOS and Android.
Expand Down
8 changes: 4 additions & 4 deletions src/Uno.Toolkit.UI/Behaviors/DrawerControlBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public static class DrawerControlBehavior
new PropertyMetadata(default(Brush)));

[DynamicDependency(nameof(SetDrawerBackground))]
public static Brush GetDrawerBackground(DrawerControl obj) => (Brush)obj.GetValue(DrawerBackgroundProperty);
public static Brush GetDrawerBackground(DependencyObject obj) => (Brush)obj.GetValue(DrawerBackgroundProperty);

[DynamicDependency(nameof(GetDrawerBackground))]
public static void SetDrawerBackground(DrawerControl obj, Brush value) => obj.SetValue(DrawerBackgroundProperty, value);
public static void SetDrawerBackground(DependencyObject obj, Brush value) => obj.SetValue(DrawerBackgroundProperty, value);

#endregion
#region DependencyProperty: OpenDirection
Expand Down Expand Up @@ -127,9 +127,9 @@ public static class DrawerControlBehavior
new PropertyMetadata(DrawerControl.DefaultValues.FitToDrawerContent));

[DynamicDependency(nameof(SetFitToDrawerContent))]
public static bool GetFitToDrawerContent(DrawerControl obj) => (bool)obj.GetValue(FitToDrawerContentProperty);
public static bool GetFitToDrawerContent(DependencyObject obj) => (bool)obj.GetValue(FitToDrawerContentProperty);
[DynamicDependency(nameof(GetFitToDrawerContent))]
public static void SetFitToDrawerContent(DrawerControl obj, bool value) => obj.SetValue(FitToDrawerContentProperty, value);
public static void SetFitToDrawerContent(DependencyObject obj, bool value) => obj.SetValue(FitToDrawerContentProperty, value);

#endregion
}
Expand Down

0 comments on commit d2952e9

Please sign in to comment.