WPF选择背景颜色

时间:2013-02-01 14:33:17

标签: c# wpf background

好的,所以我刚尝试了WPF WPF Example from msdn,我注意到它说你得到一个下拉菜单,但是如果我转到xaml代码本身,我只会得到一个下拉菜单。 即便如此,当选择棕色时,它会显示一些深红色,这是什么?

问题:

如何获得默认的棕色。

代码:

抱歉忘记了Xaml代码..

<Window x:Class="WPF_Ink_Pane.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Ink Pane" Height="550" Width="370">
<Grid Background="Brown" Height="520" VerticalAlignment="Top">
    <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="0*"/>
    </Grid.ColumnDefinitions>
    <InkCanvas x:Name="inkCanvas" Margin="9,9,10,68" Background="LightYellow"/>
    <Button x:Name="btnClear" Content="Clear" HorizontalAlignment="Left" Margin="9,457,0,0" VerticalAlignment="Top" Width="149" Height="39" Click="btnClear_Click"/>
    <Button x:Name="btnClose" Content="Close" HorizontalAlignment="Left" Margin="202,457,9,0" VerticalAlignment="Top" Width="150" Height="39" Click="btnClose_Click"/>

</Grid>

编辑:

enter image description here

1 个答案:

答案 0 :(得分:1)

Properties Window

这是您的属性窗口的样子吗?

MSDN必须意味着SaddleBrown因为是,标准Brown有一个红色调。

相关问题