1
J'essaye de changer la 3ème/dernière colonne.Comment personnaliser une colonne TreeView avec des contrôles HyperLink/LinkLabel pour chaque TreeViewItem dans cette colonne dans WPF?
Exemple de code:
<Window x:Class="WpfTest2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:r="http://schemas.aspitalia.com/Ricciolo/Controls"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid.Resources>
<XmlDataProvider x:Key="data" Source="Data.xml">
</XmlDataProvider>
<HierarchicalDataTemplate x:Key="dt" ItemsSource="{Binding XPath=outline}">
</HierarchicalDataTemplate>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<r:TreeView Name="Report" ItemsSource="{Binding Source={StaticResource data},XPath=/opml/body/outline/outline}" ItemTemplate="{StaticResource dt}">
<r:TreeView.Columns>
<GridViewColumn Header="Title" DisplayMemberBinding="{Binding [email protected]}" Width="150" />
<GridViewColumn Header="Childs" DisplayMemberBinding="{Binding [email protected]}" Width="100" />
<GridViewColumn Header="Url" DisplayMemberBinding="{Binding [email protected]}" Width="200" />
</r:TreeView.Columns>
</r:TreeView>
</Grid>
</Window>