gpt4 book ai didi

c# - 中心内容 XAML

转载 作者:可可西里 更新时间:2023-11-01 09:24:48 26 4
gpt4 key购买 nike

如何在 XAML Windows 8.1 中使元素居中?当在全屏上设置星形应用程序后的边距时,我看到了这个: enter image description here

<ProgressRing   Name="Load" 
IsActive="True"
HorizontalAlignment="Stretch"
Margin="672,373,674,373"
VerticalAlignment="Stretch"
Foreground="White"/>

<TextBlock Margin="528,466,526,256"
TextWrapping="Wrap"
Text="Caricamento..."
FontSize="50"
IsRightTapEnabled="False"
IsHoldingEnabled="False"
IsDoubleTapEnabled="False"
IsTapEnabled="False"
Foreground="White"/>

在程序员模式下我看到了这个: enter image description here

最佳答案

试试这个,使用 Horizo​​ntalAlignmentVerticalAlignment 居中。而不是边距。

<ProgressRing   Name="Load" 
IsActive="True"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="White"/>

<TextBlock TextWrapping="Wrap"
Text="Caricamento..."
FontSize="50"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsRightTapEnabled="False"
IsHoldingEnabled="False"
IsDoubleTapEnabled="False"
IsTapEnabled="False"
Foreground="White"/>

关于c# - 中心内容 XAML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20959620/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com