Created
June 19, 2012 05:39
-
-
Save pinzolo/2952468 to your computer and use it in GitHub Desktop.
HierarchicalDataTemplate な TreeViewItem にイベントを設定する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="MktSys.Gui.HierarchicalDataTemplateTreeViewItemEventSettingWindos" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="HierarchicalDataTemplate な TreeViewItem にイベントを設定する" Height="525" Width="300"> | |
<Grid> | |
<TreeView Name="treeView" ItemsSource="{Binding Elements}" VerticalContentAlignment="Stretch"> | |
<TreeView.ItemContainerStyle> | |
<Style TargetType="{x:Type TreeViewItem}"> | |
<EventSetter Event="MouseDoubleClick" Handler="treeViewItem_MouseDoubleClick" /> | |
</Style> | |
</TreeView.ItemContainerStyle> | |
<TreeView.ItemTemplate> | |
<HierarchicalDataTemplate ItemsSource="{Binding Children}"> | |
<Label Content="{Binding Name}" /> | |
</HierarchicalDataTemplate> | |
</TreeView.ItemTemplate> | |
</TreeView> | |
</Grid> | |
</Windows> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment