내 TreeView의 노드에 여러 줄이있는 경우 TreeView 글 머리 기호가 세로 가운데에 배치됩니다.XAML TreeView HierarchicalDataTemplate에서 글 머리 기호를 세로로 맞추려면 어떻게해야합니까?
어떻게 TreeView 글 머리 기호를 정렬 할 수 있습니까?
alt text http://www.deviantsart.com/upload/1uh2k8p.png
<pages:BasePage.Resources>
<data:HierarchicalDataTemplate x:Key="OutlineTemplate"
ItemsSource="{Binding OutlineDocumentObjects}">
<TextBlock Text="{Binding Line}"
TextWrapping="Wrap"
VerticalAlignment="Top"
Width="600"/>
</data:HierarchicalDataTemplate>
</pages:BasePage.Resources>
<StackPanel Style="{StaticResource StackPanelPageWrapperStyle}">
<tk:TreeView x:Name="TheTreeView"
ItemsSource="{Binding TheOutline.OutlineDocumentObjects}"
ItemTemplate="{StaticResource OutlineTemplate}">
</tk:TreeView>
</StackPanel>
Template.FindName을 사용하려면 코드에서 무엇을 참조해야합니까? –
아무것도 템플릿은 현재 인스턴스 (this.Template)의 속성입니다 –
'System.Windows.Controls.ControlTemplate'에 'FindName'에 대한 정의가없고 확장 메서드가없는 'FindName'이 첫 번째로 허용됩니다 'System.Windows.Controls.ControlTemplate'형식의 인수를 찾을 수 있습니다 (지시문이나 어셈블리 참조가 누락 되었습니까?) –