@@ -221,11 +221,11 @@ private IntPtr WindowProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, re
221221 if ( rect . Contains ( new Point ( x , y ) ) )
222222 {
223223 handled = true ;
224- contentPresenter . Opacity = 0.7 ;
224+ contentPresenter . Opacity = 1 ;
225225 }
226226 else
227227 {
228- contentPresenter . Opacity = 1 ;
228+ contentPresenter . Opacity = 0.7 ;
229229 }
230230 return new IntPtr ( OSVersionHelper . HTMAXBUTTON ) ;
231231 }
@@ -273,43 +273,6 @@ private IntPtr WindowProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, re
273273 return IntPtr . Zero ;
274274 }
275275
276- private bool HandleSnapLayoutMessage ( int msg , IntPtr lParam , ref IntPtr result )
277- {
278- Button button = TitleBarMode == TitleBarMode . Normal
279- ? ( WindowState != WindowState . Maximized ? _titleBarMaximizeButton : _titleBarRestoreButton )
280- : ( WindowState != WindowState . Maximized ? _highTitleMaximizeButton : _highTitleRestoreButton ) ;
281-
282- if ( button == null || button . ActualWidth <= 0 || button . ActualHeight <= 0 )
283- return false ;
284- var contentPresenter = button . Template . FindName ( "PART_ContentPresenter" , button ) as ContentPresenter ;
285- if ( contentPresenter == null ) return false ;
286- var x = lParam . ToInt32 ( ) & 0xffff ;
287- var y = lParam . ToInt32 ( ) >> 16 ;
288- var dpiX = OSVersionHelper . DeviceUnitsScalingFactorX ;
289- var rect = new Rect ( button . PointToScreen ( new Point ( ) ) , new Size ( button . ActualWidth * dpiX , button . ActualHeight * dpiX ) ) ;
290- var point = new Point ( x , y ) ;
291-
292- if ( msg == WindowsMessageCodes . WM_NCHITTEST && contentPresenter != null )
293- {
294- if ( ! rect . Contains ( point ) )
295- {
296- if ( contentPresenter . Opacity != 0.7 )
297- contentPresenter . Opacity = 0.7 ;
298- return false ;
299- }
300- contentPresenter . Opacity = 1 ;
301- result = new IntPtr ( OSVersionHelper . HTMAXBUTTON ) ;
302- }
303- else if ( msg == WindowsMessageCodes . WM_NCLBUTTONDOWN )
304- {
305- IInvokeProvider invokeProv = new ButtonAutomationPeer ( button ) . GetPattern ( PatternInterface . Invoke ) as IInvokeProvider ;
306- invokeProv ? . Invoke ( ) ;
307- }
308-
309- return true ;
310- }
311-
312-
313276 private void ShowSystemMenu ( object sender , ExecutedRoutedEventArgs e )
314277 {
315278 var element = e . OriginalSource as FrameworkElement ;
0 commit comments