Style for eclipse not working
Posted
by KentZhou
on Stack Overflow
See other posts from Stack Overflow
or by KentZhou
Published on 2009-12-14T19:21:23Z
Indexed on
2010/04/08
12:33 UTC
Read the original article
Hit count: 245
Silverlight
I create a style in resource dictionary file as below for silverlight app:
<Style x:Key="YesStyle" TargetType="Ellipse">
<Setter Property="Stroke" Value="Black"/>
<Setter Property="Height" Value="14"/>
<Setter Property="Width" Value="14"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Margin" Value="0,-220,0,0"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Fill">
<Setter.Value>
<LinearGradientBrush EndPoint="0.942,0.239" StartPoint="0.078,0.776">
<GradientStop Color="#FFFFFFFF"/>
<GradientStop Color="#FFFC0E06" Offset="0.035"/>
<GradientStop Color="#FFE8EBF0" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
then use it in user control as below:
<Ellipse Style="{StaticResource YesStyle}" />
When run the app, nothing comes out. no error. Why?
© Stack Overflow or respective owner