view SilverlightGlimpse/SilverlightGlimpse.Test/MainPage.xaml @ 65:5d0c5cc83a7a

Click event handler added
author Steven Hollidge <stevenhollidge@hotmail.com>
date Sun, 22 Apr 2012 14:21:33 +0100
parents ba89e36631bc
children
line wrap: on
line source

<UserControl x:Class="SilverlightGlimpse.Test.MainPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             d:DesignHeight="300"
             d:DesignWidth="400"
             mc:Ignorable="d">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="300" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ListBox x:Name="listbox1">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Grid x:Name="backgroundGrid"
                          Width="40"
                          Height="40">
                        <Rectangle Fill="Orange" />
                        <TextBlock x:Name="LabelForIdProperty"
                                   HorizontalAlignment="Center"
                                   FontSize="24"
                                   Foreground="White"
                                   Text="{Binding IncorrectPathName}" />
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

        <Button x:Name="btnThrowException"
                Grid.Row="1"
                Click="btnThrowException_Click"
                Content="Throw Exception" />

    </Grid>
</UserControl>