Use an ellipse shape as a window.

T

tshad

If I have the following ellipse shape set up in my wpf project, how would I set it up as a data entry screen - some buttons and dropdowns.

I assume I would have to put some type of panel (stack, grid, etc) inside the ellipse.

Where would I put the panel in this xaml?

<Window x:Class="SeeThru.Transparency"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="450" Width="350"
WindowStyle="None" AllowsTransparency="True"
Background="{x:Null}"
<Grid MouseRightButtonDown="WindowClicked" >
<Ellipse Fill="Black" x:Name="ellipse" MouseDown="Ellipse_MouseDown" Width="300" Height="400" StrokeThickness="8" >
<Ellipse.OpacityMask>
<RadialGradientBrush x:Name="opacBrush">
<GradientStop Offset=".2" Color="#01000000"></GradientStop>
<GradientStop Offset="1" Color="#aa113300"></GradientStop>
</RadialGradientBrush>
</Ellipse.OpacityMask>
<Ellipse.Stroke>
<LinearGradientBrush>
<LinearGradientBrush.GradientStops>
<GradientStop Color="Red" Offset="0.1"/>
<GradientStop Color="Orange" Offset="0.95"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Ellipse.Stroke>
<Ellipse.BitmapEffect>
<BevelBitmapEffect></BevelBitmapEffect>
</Ellipse.BitmapEffect>
</Ellipse>
</Grid>
</Window>

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

WPF forms 2
WPF Rightbutton problem 1
Media in my aspx 2
xml name spaces 1
WPF DockPanel positioning 6
Silverlight 4 combobox 11
Silverlight 4 combobox 2
Problem with running a Progress Bar... 1

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top