1

我在 C# 中使用 XAML 制作了一个弹出窗口,现在我想更改为标题和后退按钮保留的空间的背景颜色。但该区域未在弹出页面中定义。有谁知道如何更改标题和后退按钮周围面板的背景颜色?

<SettingsFlyout
x:Class="CatalogApp.FlyoutControl.Login"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CatalogApp.FlyoutControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
IconSource="Assets/SmallLogo.png"
Title="Login"
d:DesignWidth="346">


<!-- This StackPanel acts as a root panel for vertical layout of the content sections -->
<StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch" RenderTransformOrigin="0.458,1.194" Width="250" >

    <!-- The StackPanel(s) below define individual content sections -->

    <!-- Content Section 1  Maring: left, up, down, right-->
    <TextBlock x:Name="LBLuserName" TextWrapping="Wrap" Text="Username" FontSize="18" Margin="10,0,0,0"/>
    <TextBox x:Name="TbUserName" TextWrapping="Wrap" Margin="10,0,0,0"/>
    <TextBlock x:Name="LBLpassWord" TextWrapping="Wrap" FontSize="18" Text="Password" Margin="10,20,0,0"/>
    <TextBox x:Name="TbPassWord" TextWrapping="Wrap" Margin="10,0,0,0" KeyDown="TbPassWord_KeyDown"/>
    <TextBlock x:Name="TAWebService" TextWrapping="Wrap" Text="WebserviceURL (Inclusief HTTP://)" Margin=" 10,20,0,0" FontSize="15"/>
    <TextBox x:Name="TBWebServiceURL" TextWrapping="Wrap" Margin="10,0,0,20" PlaceholderText=""/>
    <Button x:Name="BTCheckConnection" Content="Check connectie" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,0,100,0" Click="BTCheckConnection_Click"/>
    <TextBlock x:Name="TBConnection" TextWrapping="Wrap" Margin="10,20,0,0"/>
    <Button x:Name="btTrue" Content="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Click="btTrue_Click"/>
    <Button x:Name="btFalse" Content="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Click="btFalse_Click"/>
    <!-- Content Section 1-->

    <!-- Define more Content Sections below as necessary -->

</StackPanel>

4

1 回答 1

2

你只需添加HeaderBackground喜欢;

<SettingsFlyout
x:Class="CatalogApp.FlyoutControl.Login"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CatalogApp.FlyoutControl"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
IconSource="Assets/SmallLogo.png"
Title="Login"
d:DesignWidth="346"
HeaderBackground="Green">

干杯

于 2014-06-10T15:20:42.153 回答