Iam working on dataTemplate in windows phone 7. I had customised Listbox with data template. now i need to get the values from the customised listbox. Please check the code is below.
<phone:PhoneApplicationPage.Resources>
<Style x:Key="Image_List" TargetType="ListBox">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBox">
<Grid>
<Rectangle Fill="#FF030403" RadiusY="10" RadiusX="10" Stroke="#1BA1E2" StrokeThickness="2"/>
<ScrollViewer x:Name="ScrollViewer">
<ItemsPresenter Height="Auto"/>
</ScrollViewer>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</phone:PhoneApplicationPage.Resources>
<ListBox BorderBrush="#1BA1E2" Name="Image_Listbox" Margin="5,53,6,6" Style="{StaticResource Image_List}">
<ListBox.ItemTemplate>
<DataTemplate>
<Border CornerRadius="5" BorderBrush="#1BA1E2" BorderThickness="1" Margin="3,1,0,0" Height="69" Width="445">
<StackPanel Margin="0,0,0,0" Background="Transparent" Orientation="Horizontal" Height="69" Width="400">
<CheckBox Name="Images_Check" Margin="0,0,0,0" Content="" Height="67" HorizontalAlignment="Left"/>
<TextBlock TextAlignment="Left" FlowDirection="LeftToRight" Width="Auto" FontSize="22" Text="{Binding UBindData}" Height="40" />
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Iam getting the UI_Template correctly.the user will check the required Items in the checkbox provided. now i need to get the checked items in my code. can anybody help me out of this? How to get the checked Items and Itemvalue by the user.
Thanks in advance.