@@ -58,6 +58,7 @@ public event RoutedEventHandler ClosingFinished
58
58
public static readonly DependencyProperty ThemeProperty = DependencyProperty . Register ( "Theme" , typeof ( FlyoutTheme ) , typeof ( Flyout ) , new FrameworkPropertyMetadata ( FlyoutTheme . Dark , ThemeChanged ) ) ;
59
59
public static readonly DependencyProperty ExternalCloseButtonProperty = DependencyProperty . Register ( "ExternalCloseButton" , typeof ( MouseButton ) , typeof ( Flyout ) , new PropertyMetadata ( MouseButton . Left ) ) ;
60
60
public static readonly DependencyProperty CloseButtonVisibilityProperty = DependencyProperty . Register ( "CloseButtonVisibility" , typeof ( Visibility ) , typeof ( Flyout ) , new FrameworkPropertyMetadata ( Visibility . Visible ) ) ;
61
+ public static readonly DependencyProperty CloseButtonIsCancelProperty = DependencyProperty . Register ( "CloseButtonIsCancel" , typeof ( bool ) , typeof ( Flyout ) , new FrameworkPropertyMetadata ( false ) ) ;
61
62
public static readonly DependencyProperty TitleVisibilityProperty = DependencyProperty . Register ( "TitleVisibility" , typeof ( Visibility ) , typeof ( Flyout ) , new FrameworkPropertyMetadata ( Visibility . Visible ) ) ;
62
63
public static readonly DependencyProperty AreAnimationsEnabledProperty = DependencyProperty . Register ( "AreAnimationsEnabled" , typeof ( bool ) , typeof ( Flyout ) , new PropertyMetadata ( true ) ) ;
63
64
public static readonly DependencyProperty FocusedElementProperty = DependencyProperty . Register ( "FocusedElement" , typeof ( FrameworkElement ) , typeof ( Flyout ) , new UIPropertyMetadata ( null ) ) ;
@@ -90,6 +91,15 @@ public Visibility CloseButtonVisibility
90
91
set { SetValue ( CloseButtonVisibilityProperty , value ) ; }
91
92
}
92
93
94
+ /// <summary>
95
+ /// Gets/sets if the close button is a cancel button in this flyout.
96
+ /// </summary>
97
+ public bool CloseButtonIsCancel
98
+ {
99
+ get { return ( bool ) GetValue ( CloseButtonIsCancelProperty ) ; }
100
+ set { SetValue ( CloseButtonIsCancelProperty , value ) ; }
101
+ }
102
+
93
103
/// <summary>
94
104
/// An ICommand that executes when the flyout's close button is clicked.
95
105
/// Note that this won't execute when <see cref="IsOpen"/> is set to <c>false</c>.
0 commit comments