小编nit*_*tin的帖子

Visibility.Collapse在WPF中不起作用

Visibility.Collapse在我的情况下不起作用.下面是XAML.如果我试图隐藏lblCountrycmbCountry被压缩和实践领域之间所示的空白.没有选项可以隐藏整行Grid.

<Grid>
    <Canvas Name="canDemographic" >

    </Canvas>
    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40" />
            <RowDefinition Height="40" />
            <RowDefinition Height="40" />
            <RowDefinition Height="40" />
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <TextBlock Width="800" Height="50" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center"  FontFamily="Arial" FontSize="30" FontWeight="Bold" Visibility="Collapsed">
  Please review or enter your user information details:
        </TextBlock>
        <TextBlock Width="200" Height="30" Grid.Column="0" Grid.Row="2" …
Run Code Online (Sandbox Code Playgroud)

.net wpf xaml visibility wpf-controls

4
推荐指数
1
解决办法
3708
查看次数

标签 统计

.net ×1

visibility ×1

wpf ×1

wpf-controls ×1

xaml ×1