开发者

How to hide entire DataGrid in Silverlight?

开发者 https://www.devze.com 2023-01-06 00:09 出处:网络
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

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

精彩评论

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