File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 3
3
xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
4
4
xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
5
5
xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
6
- xmlns : local =" clr-namespace:MaterialDesignColors.WpfExample.Domain"
7
6
xmlns : wpf =" clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
8
7
xmlns : system =" clr-namespace:System;assembly=mscorlib"
9
- xmlns : wpfExample =" clr-namespace:MaterialDesignColors.WpfExample"
10
8
xmlns : materialDesignDemo =" clr-namespace:MaterialDesignDemo"
11
9
mc : Ignorable =" d"
12
10
d : DesignHeight =" 300" d : DesignWidth =" 300" >
51
49
CANCEL
52
50
</Button >
53
51
</StackPanel >
54
-
55
-
56
52
</Grid >
57
53
</UserControl >
Original file line number Diff line number Diff line change @@ -231,7 +231,6 @@ private static void IsOpenPropertyChangedCallback(DependencyObject dependencyObj
231
231
ValidationAssist . SetSuppress ( dialogHost . _popupContentControl , ! dialogHost . IsOpen ) ;
232
232
VisualStateManager . GoToState ( dialogHost , dialogHost . SelectState ( ) , ! TransitionAssist . GetDisableTransitions ( dialogHost ) ) ;
233
233
234
-
235
234
if ( dialogHost . IsOpen )
236
235
{
237
236
WatchWindowActivation ( dialogHost ) ;
@@ -578,16 +577,18 @@ private static void WatchWindowActivation(DialogHost dialogHost)
578
577
}
579
578
580
579
private void WindowOnDeactivated ( object sender , EventArgs eventArgs )
581
- {
582
- _restoreFocus = _popupContentControl != null ? FocusManager . GetFocusedElement ( _popupContentControl ) : null ;
580
+ {
581
+ _restoreFocus = _popup != null ? FocusManager . GetFocusedElement ( ( Window ) sender ) : null ;
583
582
}
584
583
585
584
private void WindowOnActivated ( object sender , EventArgs eventArgs )
586
585
{
587
586
if ( _restoreFocus != null )
588
587
{
589
- Dispatcher . BeginInvoke ( new Action ( ( ) => Keyboard . Focus ( _restoreFocus ) ) ) ;
590
-
588
+ Dispatcher . BeginInvoke ( new Action ( ( ) =>
589
+ {
590
+ Keyboard . Focus ( _restoreFocus ) ;
591
+ } ) ) ;
591
592
}
592
593
}
593
594
}
Original file line number Diff line number Diff line change 584
584
</VisualStateGroup >
585
585
</VisualStateManager .VisualStateGroups>
586
586
<controlzEx : PopupEx IsOpen =" False"
587
- PlacementTarget =" {Binding ElementName=DialogHostRoot, Mode=OneWay}"
587
+ PlacementTarget =" {Binding ElementName=DialogHostRoot, Mode=OneWay}"
588
588
StaysOpen =" True"
589
589
AllowsTransparency =" True"
590
590
PopupAnimation =" None"
608
608
TextOptions.TextRenderingMode=" Auto"
609
609
Foreground =" {DynamicResource MaterialDesignBody}"
610
610
FontFamily =" {StaticResource MaterialDesignFont}"
611
- FocusManager.IsFocusScope=" True"
612
- KeyboardNavigation.TabNavigation=" Contained"
613
611
IsTabStop =" False"
614
612
Opacity =" 0"
615
613
RenderTransformOrigin =" .5,.5"
You can’t perform that action at this time.
0 commit comments