File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ public double DpiScale
5353
5454 // AppBar properties
5555 private int AppBarMessageId = - 1 ;
56+ private NativeMethods . Rect _lastAppBarRect ;
5657
5758 private AppBarEdge _appBarEdge ;
5859 public AppBarEdge AppBarEdge
@@ -667,13 +668,14 @@ protected void UnregisterAppBar()
667668 #region Virtual methods
668669 public virtual void AfterAppBarPos ( bool isSameCoords , NativeMethods . Rect rect )
669670 {
671+ _lastAppBarRect = rect ;
670672 if ( ! isSameCoords )
671673 {
672674 var timer = new DispatcherTimer { Interval = TimeSpan . FromSeconds ( 0.1 ) } ;
673675 timer . Tick += ( sender1 , args ) =>
674676 {
675677 // set position again, since WPF may have overridden the original change from AppBarHelper
676- SetAppBarPosition ( rect ) ;
678+ SetAppBarPosition ( _lastAppBarRect ) ;
677679
678680 timer . Stop ( ) ;
679681 } ;
You can’t perform that action at this time.
0 commit comments