@@ -5,34 +5,39 @@ namespace WPFDevelopers.Controls
55{
66 public static class MessageBox
77 {
8- public static MessageBoxResult Show ( string messageBoxText , Window owner = null , double buttonRadius = 0d )
8+ public static MessageBoxResult Show ( string messageBoxText , Window owner = null , double buttonRadius = 0d , bool isDefault = true )
99 {
1010 var msg = new WDMessageBox ( messageBoxText , buttonRadius ) ;
11+ msg . IsDefault = isDefault ;
1112 return GetWindow ( msg , owner ) ;
1213 }
1314
14- public static MessageBoxResult Show ( string messageBoxText , string caption , Window owner = null , double buttonRadius = 0d )
15+ public static MessageBoxResult Show ( string messageBoxText , string caption , Window owner = null , double buttonRadius = 0d , bool isDefault = true )
1516 {
1617 var msg = new WDMessageBox ( messageBoxText , caption , buttonRadius ) ;
18+ msg . IsDefault = isDefault ;
1719 return GetWindow ( msg , owner ) ;
1820 }
1921
20- public static MessageBoxResult Show ( string messageBoxText , string caption , MessageBoxButton button , Window owner = null , double buttonRadius = 0d )
22+ public static MessageBoxResult Show ( string messageBoxText , string caption , MessageBoxButton button , Window owner = null , double buttonRadius = 0d , bool isDefault = true )
2123 {
2224 var msg = new WDMessageBox ( messageBoxText , caption , button , buttonRadius ) ;
25+ msg . IsDefault = isDefault ;
2326 return GetWindow ( msg , owner ) ;
2427 }
2528
26- public static MessageBoxResult Show ( string messageBoxText , string caption , MessageBoxImage icon , Window owner = null , double buttonRadius = 0d )
29+ public static MessageBoxResult Show ( string messageBoxText , string caption , MessageBoxImage icon , Window owner = null , double buttonRadius = 0d , bool isDefault = true )
2730 {
2831 var msg = new WDMessageBox ( messageBoxText , caption , icon , buttonRadius ) ;
32+ msg . IsDefault = isDefault ;
2933 return GetWindow ( msg , owner ) ;
3034 }
3135
3236 public static MessageBoxResult Show ( string messageBoxText , string caption , MessageBoxButton button ,
33- MessageBoxImage icon , Window owner = null , double buttonRadius = 0d )
37+ MessageBoxImage icon , Window owner = null , double buttonRadius = 0d , bool isDefault = true )
3438 {
3539 var msg = new WDMessageBox ( messageBoxText , caption , button , icon , buttonRadius ) ;
40+ msg . IsDefault = isDefault ;
3641 return GetWindow ( msg , owner ) ;
3742 }
3843
0 commit comments