![](/img/trans.png)
[英]Change the style of content dialog button in windows phone universal application
[英]How to change style of title of Content Dialog in Windows Phone 8.1
如何在Windows Phone 8.1中更改ContentDialog
頁面的title
屬性的樣式。
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
顯示的文字樣式嗎?
編輯
如果title
未提及,如何減少ContentDialog
最上面的空白空間?
標題將顯示在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>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.