好的,所以我刚刚从 msdn尝试了 WPF WPF 示例,我注意到它说你得到一个下拉菜单,但是如果我转到 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>