xaml-sdk/TreeView/CancelDragStart/App.xaml

24 строки
1.2 KiB
XML

<Application x:Class="CancelDragStart.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CancelDragStart"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!--This style is applied globally to all RadTreeViewItems. It is used to easily expand all items.-->
<Style TargetType="telerik:RadTreeViewItem">
<Setter Property="IsExpanded" Value="True" />
</Style>
<HierarchicalDataTemplate x:Key="itemTemplate" ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Header}" />
<StackPanel Background="{Binding Brush}" Margin="5 0 0 0" Orientation="Horizontal">
<CheckBox IsChecked="{Binding CanDrag, Mode=TwoWay}" Margin="3" />
<TextBlock Text="Can drag?" Padding="0 3 3 3"/>
</StackPanel>
</StackPanel>
</HierarchicalDataTemplate>
</Application.Resources>
</Application>