银色风格

时间:2010-04-15 11:34:23

标签: silverlight silverlight-3.0

<navigation:Page.Resources>
<Style x:Key="PageBackground" TargetType="Grid">
        <Setter Property="Background">
            <Setter.Value>

                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
                    <GradientStop Color="White" Offset="1"/>
                    <GradientStop Color="Silver"/>
                </LinearGradientBrush>


                <Path x:Name="shinePath" Data="M0,0 L0,300 C-5.5,306.5 40,68 215,0 z" Stretch="Fill" Opacity="0.1">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" SpreadMethod="Pad">
                            <GradientStop Color="Black" Offset="0"/>
                            <GradientStop Color="#00FFFFFF" Offset="0.871"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
            </Setter.Value>
        </Setter>
    </Style>
       </navigation:Page.Resources>

错误 - 属性'值'设置多次

1 个答案:

答案 0 :(得分:1)

您有一个<Setter.Value>元素,它只能包含一个子元素。看起来好像Path是针对不同的属性。想不到什么虽然Grid没有可以接受路径的属性。您是否打算将路径作为网格的内容?