【发布时间】:2010-11-12 00:10:37
【问题描述】:
我一直在尝试让工具包中的新颜色选择器在我的应用程序中运行,但没有成功...
这里是示例代码,它应该获取窗口背景的颜色以填充当前颜色,并且在新选择时,应该将背景颜色更改为所选颜色...
<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>
这是我能够在颜色选择器上找到的所有文档... http://elegantcode.com/2010/08/15/extended-wpf-toolkit-new-colorpicker-control/
【问题讨论】: