|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SoapBox.Demo.PinBall"
xmlns:arena="clr-namespace:SoapBox.Core.Arena;assembly=SoapBox.Core.Arena"
x:Class="SoapBox.Demo.PinBall.PinBallTargetView">
<!-- Make it blue -->
<DataTemplate DataType="{x:Type local:PinBallTargetCasingSprite}">
<Rectangle Width="{Binding Width}" Height="{Binding Height}"
RadiusX="5" RadiusY="5"
Stroke="Blue" StrokeThickness="3">
<Rectangle.Fill>
<RadialGradientBrush GradientOrigin="0.33,0.33">
<GradientStop Offset="0" Color="DeepSkyBlue" />
<GradientStop Offset="1" Color="Blue"/>
</RadialGradientBrush>
</Rectangle.Fill>
<Rectangle.RenderTransform>
<TransformGroup>
<TranslateTransform X="{Binding XOffset}"/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
</DataTemplate>
<!-- Make it orange -->
<DataTemplate DataType="{x:Type local:PinBallTargetPistonSprite}">
<Rectangle Width="{Binding Width}" Height="{Binding Height}"
RadiusX="5" RadiusY="5"
Stroke="Black" StrokeThickness="3">
<Rectangle.Fill>
<RadialGradientBrush GradientOrigin="0.33,0.33">
<GradientStop Offset="0" Color="Orange" />
<GradientStop Offset="1" Color="DarkOrange"/>
</RadialGradientBrush>
</Rectangle.Fill>
<Rectangle.RenderTransform>
<TransformGroup>
<TranslateTransform X="{Binding XOffset}" Y="{Binding YOffset}"/>
</TransformGroup>
</Rectangle.RenderTransform>
</Rectangle>
</DataTemplate>
</ResourceDictionary>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
By day I'm a Professional Engineer, doing .NET, VB6, SQL Server, and Automation (Ladder Logic, etc.) programming.
On weekends I write and maintain an open source extensible application framework called
SoapBox Core.
In the evenings I provide front line technical support for
moms4mom.com and I help out with administrative tasks (like formatting stuff). I also pitch in as a moderator from time to time.
You can
follow me on twitter.