WPF ListView의 각 눈금 열 위쪽에 머리글을 숨기고 싶습니다.어떻게 목록보기 WPF의 머리글을 숨길 수 있습니까?
이<Window x:Class="ListViewTest.Test0.ListViewTest"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Empty ListView Grid" Height="216" Width="435" FlowDirection="LeftToRight" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.IsSharedSizeScope="False">
<Window.Resources>
<XmlDataProvider x:Key="CustomersDS" Source="C:\data.xml"/>
</Window.Resources>
<ListView Margin="0,0,0,50" ItemTemplate="{DynamicResource CustomerTemplate}" ItemsSource="{Binding Source={StaticResource CustomersDS}, XPath=/Customers/Customer}">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding XPath=Code}"/>
<GridViewColumn DisplayMemberBinding="{Binding XPath=Name}"/>
<GridViewColumn DisplayMemberBinding="{Binding XPath=Country}"/>
</GridView>
</ListView.View>
</ListView>
</Window>
내가이 바인딩하고 데이터는 다음과 같습니다 :
<Customers>
<Customer>
<Code>1234</Code>
<Name>EPI</Name>
<Country>Sesame Street</Country>
</Customer>
<Customer>
<Code>3234</Code>
<Name>Paul</Name>
<Country>United Kingdom</Country>
</Customer>
<Customer>
<Code>3344</Code>
<Name>Juan</Name>
<Country>Spain</Country>
</Customer>
<Customer>
<Code>4321</Code>
<Name>Dodo</Name>
<Country>Mars</Country>
</Customer>
</Customers>
최소한 WPF 3.5에서 FrameworkElement.Visibility가되어야하지 않습니까? (이 주제는 오래된 주제이지만 Google에서는 최상위에 있으므로 많은 사람들에게 유용합니다.) –
꼭 그럴 필요는 없습니다. 대상 유형을 지정 했으므로 속성의 위치를 지정할 필요가 없습니다. – Ray
우수 게시 ... 시간을 많이 절약 해주고 치료를 받았습니다. 감사합니다. – Kev