如何在Windows Phone 8.1中更改title
页面ContentDialog
属性的样式。
XAML:
<ContentDialog
x:Class="MyApp.View.Login.ContentDialog1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyApp.View.Login"
Title="DIALOG TITLE">
<StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<TextBox Name="email" Header="Email address"/>
</StackPanel>
</ContentDialog>
我们Title="DIALOG TITLE"
,我可以更改title
中的文字样式吗?
修改
如果ContentDialog
没有提及,如何减少title
中最顶空的空间?
答案 0 :(得分:5)
标题将显示在ContentDialog的TitleTemplate中。您可以根据需要进行更改。
<ContentDialog
x:Class="MyApp.View.Login.ContentDialog1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyApp.View.Login"
Title="DIALOG TITLE">
<ContentDialog.TitleTemplate>
<DataTemplate>
<!-- what do you want the title to look like -->
</DataTemplate>
</ContentDialog.TitleTemplate>
<StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<TextBox Name="email" Header="Email address"/>
</StackPanel>
</ContentDialog>