<Page.Resources>
<CollectionViewSource x:Name="Maincol" />
</Page.Resources>
<HubSection x:Name="Images" Header="ListView" Width="400">
<DataTemplate>
<ListView x:Name="ListView1" SelectionMode="None" ItemsSource="{Binding Source={StaticResource cvs2}}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" x:Name="stackpanel">
<Image Source="{Binding ImageSourse}" Width="80" Height="60"/>
<StackPanel Orientation="Vertical" Background="LightGray" Width="150">
<TextBlock Text="{Binding NameT}" FontSize="14.667" FontFamily="Segoe UI" Margin="5,0,0,0" Foreground="#FF472F2F"/>
<TextBlock Text="{Binding ScreenT}" FontSize="12" FontFamily="Segoe UI" Margin="5,0,0,0" Foreground="#FF472F2F"/>
<CheckBox Margin="5,0,0,0" IsChecked="{Binding Check}" ></CheckBox>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</DataTemplate>
</HubSection>
public static IEnumerable<T> GetAllChildren<T>(this UIElement frameworkElement) where T : UIElement
{
if (frameworkElement == null)
{
yield break;
}
for (var i = 0; i < VisualTreeHelper.GetChildrenCount(frameworkElement); i++)
{
var _Child = VisualTreeHelper.GetChild(frameworkElement, i);
if (_Child is T)
{
yield return (_Child as T);
}
var control = _Child as UIElement;
foreach (var child in GetAllChildren<T>(control))
{
yield return child;
}
}
}
<CheckBox Margin="5,0,0,0" IsChecked="{Binding Check, Mode=TwoWay}" >