开发者

How to hide entire DataGrid in Silverlight?

I'm using DataGrid control and I need to hide it. I've tried to use dtgAllAccounts.Visibility =开发者_Python百科 Visibility.Collapsed. But this doesn't work. Column headers still visible. Are there any ways to hide entire DataGrid with all column headers?

<sdk:DataGrid AutoGenerateColumns="False" HorizontalAlignment="Center" Name="dtgAllAccounts" VerticalAlignment="Center" SelectionMode="Single">    
            <sdk:DataGrid.Columns>
                <sdk:DataGridTextColumn Binding="{Binding FriendlyName}" Header="Friendly Name"  IsReadOnly="True"></sdk:DataGridTextColumn>
                <sdk:DataGridTextColumn Binding="{Binding Email}" Header="Email"  IsReadOnly="True"></sdk:DataGridTextColumn>                                                                              
            </sdk:DataGrid.Columns>
</sdk:DataGrid>


Wrap it in a Grid and hide that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜