Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Use an ellipse shape as a window.

0 views
Skip to first unread message

tshad

unread,
Dec 29, 2009, 3:45:32 PM12/29/09
to
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
 
 
0 new messages