2 回答

TA贡献1780条经验 获得超1个赞
我如何创建一个“基本”内容页面,其中包含一个繁忙的指示器,并让这个页面成为彼此页面的基础
如果要在页面级别创建实例,在应用程序级别创建实例,也可以在页面级别创建实例,如下面的代码示例所示:ControlTemplateControlTemplate
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="SimpleTheme.HomePage">
<ContentPage.Resources>
<ResourceDictionary>
<ControlTemplate x:Key="TealTemplate">
...
</ControlTemplate>
<ControlTemplate x:Key="AquaTemplate">
...
</ControlTemplate>
</ResourceDictionary>
</ContentPage.Resources>
<ContentView ... ControlTemplate="{StaticResource TealTemplate}">
...
</ContentView>
</ContentPage>
在页面级别添加 时,将 a 添加到 ContentPageControlTemplate 的实例中,这些实例包含在 ResourceDictionary 中。ControlTemplateResourceDictionary, and then the
也可以使用代码,例如,来自doc的样本。
- 2 回答
- 0 关注
- 131 浏览
添加回答
举报