views:

10

answers:

0

I want to create a design using Stackpanel in XAML pad in WPF and then embed images on it using .cx file. But I am getting some error using Styles.

<Style x:Key="TopPanelDesign" TargetType="{x:Type StackPanel}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type StackPanel}">
                    <Grid Name="Outer">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid Name="Inner" Grid.Column="1">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                        </Grid>         
                    </Grid>  
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

I want to put images in the grid cells so created using a folder. What is going wrong above?