Answered by:
How do I create a half transparent image with empty middle

Question
-
I want to create a half transparent image with a empty rectangle at the middle like below:
How do I achieve this? Thanks
- Moved by Rob Caplan [MSFT]Microsoft employee, Moderator Thursday, October 10, 2013 7:59 AM
Wednesday, October 9, 2013 5:10 AM
Answers
-
I solved it by using following code in my xaml:
<Path StrokeThickness="0" Fill="Black" Opacity=".5" > <Path.Data> <GeometryGroup FillRule="EvenOdd"> <RectangleGeometry Rect="150,150,480,340" /> <RectangleGeometry Rect="0,0,1366,768" /> </GeometryGroup> </Path.Data> </Path>
- Marked as answer by howard hee Thursday, October 10, 2013 6:38 AM
Thursday, October 10, 2013 6:38 AM
All replies
-
Wednesday, October 9, 2013 10:11 PM
-
What language and UI are you using? Methods will be different in Xaml, Html, and DirectX.
Let us know and we can help you find the right forum
Thursday, October 10, 2013 12:20 AMModerator -
I am using C# and XAML. Thanks
Thursday, October 10, 2013 2:18 AM -
I solved it by using following code in my xaml:
<Path StrokeThickness="0" Fill="Black" Opacity=".5" > <Path.Data> <GeometryGroup FillRule="EvenOdd"> <RectangleGeometry Rect="150,150,480,340" /> <RectangleGeometry Rect="0,0,1366,768" /> </GeometryGroup> </Path.Data> </Path>
- Marked as answer by howard hee Thursday, October 10, 2013 6:38 AM
Thursday, October 10, 2013 6:38 AM