views:

23

answers:

1
<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>

error- property 'Value' is set more then once

+1  A: 

You've got a single <Setter.Value> element, it can contain only one child elment. Looks to me as though the Path is intended for a different property. Can't think what though Grid doesn't have a property that can accept a path. Do you intend the path to be the content of the Grid?

AnthonyWJones
path is nothing but to draw some curved lines just for the style purpose.
nectar
@Piyush: Regardless of its purpose you have to add the Path somewhere in the visual tree.
AnthonyWJones