如何将xaml代码写入xaml.cs、Xamarin.Forms?
如何在xaml.cs中以编程方式编写上述属性 我试过了如何将xaml代码写入xaml.cs、Xamarin.Forms?,xaml,xamarin,xamarin.forms,Xaml,Xamarin,Xamarin.forms,如何在xaml.cs中以编程方式编写上述属性 我试过了 AbsoluteLayout.LayoutBounds="1.1, 0.5, AutoSize, AutoSize" 但是运气不好,它似乎不起作用。我找不到类的任何成员AbsoluteLayout或AbsoluteLayoutBounds 编辑(回答): 我已经弄明白了: ContactUsButton.Layout( new Rectangle(1.12, 0.5, AbsoluteLayout.AutoSize, Absolu
AbsoluteLayout.LayoutBounds="1.1, 0.5, AutoSize, AutoSize"
但是运气不好,它似乎不起作用。我找不到类的任何成员AbsoluteLayout
或AbsoluteLayoutBounds
编辑(回答):
我已经弄明白了:
ContactUsButton.Layout(
new Rectangle(1.12, 0.5, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
供任何人使用
BR,答案如下
AbsoluteLayout.SetLayoutBounds(
ContactUsButton,
new Rectangle(1.12, 0.5, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
你应该把答案贴在下面,然后接受它。这是规定。
AbsoluteLayout.SetLayoutBounds(
ContactUsButton,
new Rectangle(1.12, 0.5, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));