XAML
- From: "west.rohan@xxxxxxxxx" <west.rohan@xxxxxxxxx>
- Date: Wed, 5 Dec 2007 14:32:31 -0800 (PST)
Hi, i have just installed VS2008 and was working on a simple WPF
application.
I created the following XAML, it produced a simple rectangle with a
reflection at the bottom. When i run the app, it looks totally
different from when it was in the designer? Why?
<Window x:Class="Reflection.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:r="clr-namespace:Reflection"
Title="Reflection" Height="500" Width="500">
<Grid>
<StackPanel HorizontalAlignment="Center" >
<Canvas x:Name="canvas" Width="478" Height="231">
<Rectangle Fill="Black" Width="50" Height="50"
Canvas.Left="143.75" Canvas.Top="108.75" />
</Canvas>
<Canvas Width="478" Height="231">
<Rectangle Width="478" Height="231">
<Rectangle.Fill>
<VisualBrush Visual="{Binding
ElementName=canvas}">
<VisualBrush.RelativeTransform>
<TransformGroup>
<ScaleTransform CenterX="0.5"
CenterY="0.5" ScaleX="1" ScaleY="-1"/>
</TransformGroup>
</VisualBrush.RelativeTransform>
</VisualBrush>
</Rectangle.Fill>
<Rectangle.OpacityMask>
<LinearGradientBrush StartPoint="0,0"
EndPoint="0,1">
<GradientStop Color="#44000000" Offset="0"/
<GradientStop Color="#00000000" Offset="1"/
</LinearGradientBrush>
</Rectangle.OpacityMask>
</Rectangle>
</Canvas>
</StackPanel>
</Grid>
</Window>
.
- Follow-Ups:
- Re: XAML
- From: Scott M.
- Re: XAML
- Prev by Date: Re: Can I bind a control to a dataset.haschanges property?
- Next by Date: Re: XAML
- Previous by thread: DataGridViewCheckBox
- Next by thread: Re: XAML
- Index(es):
Relevant Pages
|