gridview如何隐藏表头?也就是如何隐藏gridviewcolumn以及所显示的信息。 RRS feed


  • Hi 轮回的齿轮,


                    <Style x:Key="hiddenStyle" TargetType="GridViewColumnHeader">
                        <Setter Property="Visibility" Value="Hidden"/>
                    <GridViewColumn Header="First Name" 
                          DisplayMemberBinding="{Binding XPath=FirstName}" />
                    <GridViewColumn Header="Last Name" 
                          DisplayMemberBinding="{Binding XPath=LastName}" HeaderContainerStyle="{StaticResource hiddenStyle}"/>
                    <GridViewColumn Header="Favorite City"
                          DisplayMemberBinding="{Binding XPath=FavoriteCity}"/>

    Best Regards,

    Yohann Lu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    2016年11月14日 8:18