English 中文(简体)
可见性。 宇宙航行局没有放弃其空间
原标题:Visibility.Collapsed is not giving back its space

让我解释一下: 我有一个银灯主角,在400顶顶端有边境管制。 用户一旦获得认证,I navigate to a child page。 我还瓦解了马伊-马伊边界。 该儿童网页正确显示,但比主Page边界控制倒塌的地方有400个空白空间。 我认为是Visobilty。 争得的本应放弃它所占用的空间,但它似乎这样做。 我已经将VerticalAlignment=Tot放在了主食的标语上,并且还在儿童页上尝试了,但没有工作。

没有人提出任何建议? 增 编

修订法规:

 <ScrollViewer>
    <Grid x:Name="LayoutRoot"
          DataContext= {StaticResource ViewModel} >
        <Grid.RowDefinitions>
            <RowDefinition Height= 400 ></RowDefinition>
            <RowDefinition Height= * ></RowDefinition>
        </Grid.RowDefinitions>
最佳回答

你们应该能够解决这个问题,把边界划归一网,然后确定罗De边界至自治的高度。 下面的试验例子为我工作:

<Grid x:Name="MainGrid" Height="760" VerticalAlignment="Top" Background="Azure">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"></RowDefinition>
        <RowDefinition x:Name="HeaderRow"  Height="Auto"></RowDefinition>
        <RowDefinition x:Name="TabRow" Height="*"></RowDefinition>
        <RowDefinition Height="Auto"></RowDefinition>
    </Grid.RowDefinitions>

    <Border BorderThickness="1" Grid.Row="0" Background="Bisque" 
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        Name="HeaderBorder"
                        CornerRadius="10">
        <TextBlock>Test</TextBlock>
    </Border>
    <TextBlock Grid.Row="1">Test2</TextBlock>
    <Button Grid.Row="2" Content="Hide Border" Click="Button_Click"></Button>

</Grid>

以及以下法典:

private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
{
    HeaderBorder.Visibility = Visibility.Collapsed;
}
问题回答

暂无回答




相关问题
Silverlight Rich text box control

Our team decided that we need our own custom Rich text box control for Silverlight app we are developing. We looked at existing controls mentioned at A good rich text control for Silverlight but ...

Silverlight ImageBrush not rendering (with Bing Map Control)

I m trying to add an image to a Pushpin instance from the Silverlight Bing Map Control, but I can t seem to get it to render (the pushpin renders fine). This is probably a general WPF question rather ...

Silverlight OpenFileDialog DoEvents equivalent

I m processing large files after they are selected by the user. My code looks like the following: if (FileDialog.ShowDialog() == true) { // process really big file } This freezes up the UI so ...

list of controls with templates in silverlight

Does anyone know where to find a list of controls that you can set the template on in Silverlight? I ve wasted several hours now trying to create control templates only to find that the control doesn ...

Silverlight, Updating the UI during processing

I have a simple silverlight multifile upload application, and i want to provide the user with some feedback, right now its only in a test phase and i dont have the webservice. Somehow i cant get the ...

Silverlight 3 - FindName returns null

This looks a bug to me.. Using Silverlight 3 and i have a user control defined in XAML and trying to access the object during runtime returns a null. <Grid> <common:CommonGridEditPanel x:...

silverlight 3 collection binding

Someone please help me understand why this binding does not work... I have a class called SelectionManager with a property called dates which is populated by a WCF service. The property is an ...

热门标签