Add DropShadow to a Custom made Window (Blend)

后端 未结 1 1319
南笙
南笙 2021-02-13 20:41

I am creating a custom Window form using Blend. (by setting AllowTransparency to True)

I\'ve finished the design and it works

相关标签:
1条回答
  • 2021-02-13 21:27

    Ok I found the answer. ( With some help from this page )

    First of all, Set the window's AllowTransparency to True. Then change it's Background to No Brush

    Lets say you have something like this: (Ignore the Rectangle and Borders)

    enter image description here

    Then change the Grid's Background to White color. Now click on your Window and Add about 15 pixels to its width and height.

    enter image description here

    And change the Shadow settings:

    enter image description here

    Now you can see the shadow :)

    enter image description here

    I think you got the idea how this is working. Remember you can still play around with the Window height/weight and the Shadow settings to get a better effect.

    0 讨论(0)
提交回复
热议问题