我想为我的应用程序实现以下页面
因此,我使用了类似(简化)的内容:
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock>...</TextBlock>
<ListView>...</ListView>
<TextBlock>...</TextBlock>
</Grid>
如果发生错误并且数据不可用,我想在页面背景中显示一个错误,而不会阻止用户交互。就像是:
我用堆栈面板实现了错误
如何重叠ListView和stackpanel?是否将堆栈面板居中放置在Listview房间中?
我尝试过使用Canvas,但不知道如何将视图居中
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock>...</TextBlock>
<Canvas>
<StackPanel>..</StackPanel>
<ListView>...</ListView>
</Canvas>
<TextBlock>...</TextBlock>
</Grid>
尝试在页面内容上显示弹出窗口(与LayoutRoot放在同一容器上)
<Grid>
<Grid x:Name="LayoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock>...</TextBlock>
<TextBlock>...</TextBlock>
</Grid>
<Grid x:Name="PopUpGrid" Width="200" Height="200"
VerticalAllignment="Center" HorizontalAllignment="Center">
....
</Grid>
</Grid>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句