我像这样在<Frame>
页面中使用xaml
:
<StackLayout>
<Frame>
<StackLayout>
<Button></Button>
<Label></Label>
</StackLayout>
<StackLayout>
<Label></Label>
</StackLayout>
</Frame>
</StackLayout>
但是我想在C#方面做同样的事情。
我定义了StackLayout
,Label
和Button
。
现在,我可以使用Button
将StackLayout
添加到Children
,但是由于StackLayout
没有Frame
属性,因此无法将其添加到Children
。
是否可以使用C#作为背景代码在StackLayout
中添加Frame
?