简体   繁体   English

AbsoluteLayout 不存在于最新的 nventive UNO?

[英]AbsoluteLayout not present on latest nventive UNO?

This code in the xaml file, render's nothing: Please suggest as what to use to position the controls absolutely on the page.此代码在 xaml 文件中,没有渲染:请绝对在页面上对 position 控件建议使用什么。

AbsoluteLayout is a naming coming from Xamarin.Forms/MAUI. AbsoluteLayout是来自 Xamarin.Forms/MAUI 的命名。 In the WPF/WinUI/UWP XAML, the analogous layout panel is called Canvas .在 WPF/WinUI/UWP XAML 中,类似的布局面板称为Canvas

You can layout its children by setting the Canvas.Left and Canvas.Top properties:您可以通过设置Canvas.LeftCanvas.Top属性来布局其子级:

<Canvas Width="400" Height="400">
   <Button 
         Canvas.Left="100" Canvas.Top="50" 
         Width="100" Height="100" Background="Red" />
   <Border 
         Canvas.Left="20" Canvas.Top="200" 
         Width="50" Height="50" Background="Blue" />
</Canvas>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM