在 wpf 中隐藏列表视图项
hide listview item in wpf
您好,我有列表视图,如何隐藏 Id 列?这是我的列表视图 xaml:
<ListView FlowDirection="RightToLeft" Grid.Row="1" SelectionMode="Single" Name="dgv" Margin="12,0,10,-81">
<ListView.View>
<GridView>
<GridViewColumn Header="آموزشگاه" DisplayMemberBinding="{Binding Name}" />
<GridViewColumn Header="مدیر" DisplayMemberBinding="{Binding Admin}" />
<GridViewColumn Header="پایه" DisplayMemberBinding="{Binding Base}" />
<GridViewColumn Header="سال تحصیلی" DisplayMemberBinding="{Binding Year}" />
<GridViewColumn Header="Id" DisplayMemberBinding="{Binding Id}"/>
</GridView>
</ListView.View>
</ListView>
接受 solution/workaround 在这种情况下将宽度设置为 0。
您好,我有列表视图,如何隐藏 Id 列?这是我的列表视图 xaml:
<ListView FlowDirection="RightToLeft" Grid.Row="1" SelectionMode="Single" Name="dgv" Margin="12,0,10,-81">
<ListView.View>
<GridView>
<GridViewColumn Header="آموزشگاه" DisplayMemberBinding="{Binding Name}" />
<GridViewColumn Header="مدیر" DisplayMemberBinding="{Binding Admin}" />
<GridViewColumn Header="پایه" DisplayMemberBinding="{Binding Base}" />
<GridViewColumn Header="سال تحصیلی" DisplayMemberBinding="{Binding Year}" />
<GridViewColumn Header="Id" DisplayMemberBinding="{Binding Id}"/>
</GridView>
</ListView.View>
</ListView>
接受 solution/workaround 在这种情况下将宽度设置为 0。