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 33 xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
44 xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
55 xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
6- xmlns : local =" clr-namespace:MaterialDesignColors.WpfExample.Domain"
76 xmlns : wpf =" clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
87 xmlns : system =" clr-namespace:System;assembly=mscorlib"
9- xmlns : wpfExample =" clr-namespace:MaterialDesignColors.WpfExample"
108 xmlns : materialDesignDemo =" clr-namespace:MaterialDesignDemo"
119 mc : Ignorable =" d"
1210 d : DesignHeight =" 300" d : DesignWidth =" 300" >
5149 CANCEL
5250 </Button >
5351 </StackPanel >
54-
55-
5652 </Grid >
5753</UserControl >
Original file line number Diff line number Diff line change @@ -231,7 +231,6 @@ private static void IsOpenPropertyChangedCallback(DependencyObject dependencyObj
231231 ValidationAssist . SetSuppress ( dialogHost . _popupContentControl , ! dialogHost . IsOpen ) ;
232232 VisualStateManager . GoToState ( dialogHost , dialogHost . SelectState ( ) , ! TransitionAssist . GetDisableTransitions ( dialogHost ) ) ;
233233
234-
235234 if ( dialogHost . IsOpen )
236235 {
237236 WatchWindowActivation ( dialogHost ) ;
@@ -578,16 +577,18 @@ private static void WatchWindowActivation(DialogHost dialogHost)
578577 }
579578
580579 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 ;
583582 }
584583
585584 private void WindowOnActivated ( object sender , EventArgs eventArgs )
586585 {
587586 if ( _restoreFocus != null )
588587 {
589- Dispatcher . BeginInvoke ( new Action ( ( ) => Keyboard . Focus ( _restoreFocus ) ) ) ;
590-
588+ Dispatcher . BeginInvoke ( new Action ( ( ) =>
589+ {
590+ Keyboard . Focus ( _restoreFocus ) ;
591+ } ) ) ;
591592 }
592593 }
593594 }
Original file line number Diff line number Diff line change 584584 </VisualStateGroup >
585585 </VisualStateManager .VisualStateGroups>
586586 <controlzEx : PopupEx IsOpen =" False"
587- PlacementTarget =" {Binding ElementName=DialogHostRoot, Mode=OneWay}"
587+ PlacementTarget =" {Binding ElementName=DialogHostRoot, Mode=OneWay}"
588588 StaysOpen =" True"
589589 AllowsTransparency =" True"
590590 PopupAnimation =" None"
608608 TextOptions.TextRenderingMode=" Auto"
609609 Foreground =" {DynamicResource MaterialDesignBody}"
610610 FontFamily =" {StaticResource MaterialDesignFont}"
611- FocusManager.IsFocusScope=" True"
612- KeyboardNavigation.TabNavigation=" Contained"
613611 IsTabStop =" False"
614612 Opacity =" 0"
615613 RenderTransformOrigin =" .5,.5"
You can’t perform that action at this time.
0 commit comments