我一直试图从我的应用程序中的工具包中获取新的颜色选择器,但没有成功......
以下是应该采用窗口背景颜色来填充当前颜色的示例代码,并且在新选择时,应该将背景颜色更改为所选颜色...
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="100" Width="200" xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
Name="Window" Background="blue">
<Grid>
<extToolkit:ColorPicker Name="colorPicker1"
SelectedColor="{Binding ElementName=Window,Path=Background}"
CurrentColor="{Binding ElementName=Window,Path=Background}" />
</Grid>
</Window>
Run Code Online (Sandbox Code Playgroud)
这是我在彩色标签上找到的所有文档...... http://elegantcode.com/2010/08/15/extended-wpf-toolkit-new-colorpicker-control/