Maximum custom window loses drop shadow effect

前端 未结 3 654
悲哀的现实
悲哀的现实 2020-12-28 08:24

I have a custom WPF window defined as:



        
3条回答
  •  暖寄归人
    2020-12-28 08:54

    Here's some minimal code that does what you're after.

    
    
      
        
      
    
      
      
    
    
    

    This window behaves like a usual window in that it can be:

    • resized via its edges
    • dragged within the title area
    • right-clicked the title area to show the system menu
    • maximised/restored by double clicking the title area
    • snapped to the sides of your screens by dragging or using hotkeys (Win 10)

    It also has a drop shadow.


    The end result looks like this:

提交回复
热议问题