Click here to Skip to main content
15,921,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to transparent Ellipse like Window AllowsTransparency.

What I have tried:

XML
<grid>
        <ellipse name="eelipse">
             Stretch="Fill"
             Fill="Transparent"
             Stroke="Bisque" 
             StrokeThickness="2"
        </ellipse>
    </grid>


This transparent for window not full transparent . AllowsTransparency="true" show you full transparent window like i want to only part of ellipse can full transparent.

Please help me.
Posted
Updated 12-Jul-16 2:32am
v4
Comments
Beginner Luck 8-Jul-16 4:11am    
Fill="Transparent" ??
Member 11828338 8-Jul-16 4:24am    
AllowsTransparency="True" WindowStyle="None"="True" windowstyle="None" removed="Transparent">
give you full transparent window but in ellipse fill=" Transparent" property can not transparant like Window

1 solution

first set to window
AllowsTransparency="True" WindowStyle="None"


XML
<Window.Background >
      <SolidColorBrush x:Name="BackgroundBrush" Color="BlanchedAlmond" Opacity="0" ></SolidColorBrush>
  </Window.Background>


draw rectangle with fill color and in this rectangle draw ellipse
<Path Stroke="Black" StrokeThickness="5" Fill="WhiteSmoke" Opacity="100">
<Path.Data>
<CombinedGeometry GeometryCombineMode="Xor">
<CombinedGeometry.Geometry1>
<RectangleGeometry Rect="0,0,600,700" />
</CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2>
<EllipseGeometry RadiusX="300" RadiusY="300" Center="300,300" />
</CombinedGeometry.Geometry2>
</CombinedGeometry>
</Path.Data>
</Path>

ellipse is full transparent.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900