Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Grid x:Name="ContentPanelDaily"
- Grid.Row="1"
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="60" />
- <ColumnDefinition Width="80" />
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Row="0"
- Grid.Column="0"
- Style="{StaticResource PhoneTextAccentStyle}"
- Margin="0,0,0,0">
- First
- </TextBlock>
- <TextBlock Grid.Row="0"
- Grid.Column="1"
- Style="{StaticResource PhoneTextAccentStyle}"
- Margin="0,0,0,0">
- Second
- </TextBlock>
- </Grid>
- <Button OnClick="evetnHandler">
- <TextBlock Grid.Row="0"
- Grid.Column="0"
- Style="{StaticResource PhoneTextAccentStyle}"
- Margin="0,0,0,0">
- First
- </TextBlock>
- </Button>
- <ListBox ItemsSource="{Binding Items}"
- SelectedItem="{Binding Selected, Type=TwoWay}">
- <ListBox.ItemTemplate>
- <DataTemlate>
- <TextBlock
- Style="{StaticResource PhoneTextAccentStyle}"
- Margin="0,0,0,0" Text="{Binding Name}"/>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- public ObservableCollection<DataItem> Items {get;set;}
- private DataItem _selected;
- public DataItem Selected
- {
- get {return _selected;}
- set
- {
- _selected = value;
- //ha! item selected!!! handle it
- }
- }
- public class DataItem
- {
- public string Name {get;set;}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement