zl程序教程

您现在的位置是:首页 >  其他

当前栏目

C# WPF新版开源控件库:Newbeecoder.UI颜色选择器

2023-04-18 16:57:58 时间

在Newbeecoder.UI控件中默认颜色选择器通过按钮来选择颜色内容,

颜色选择器用于浏览和选择颜色。默认情况下,浏览色谱上的颜色,或在红-绿-蓝 (RGB)、色相或十六进制文本框中指定颜色。

CornerRadius属性表示可设置控件圆角。

Color 属性表示可设置选择器的颜色部分。

Text 表示当前选择的颜色文本内容。

PopupBackground 表示弹出的背景色。

PopupEffect 属性表示弹出阴影效果。

LabelHex 属性表示十六进制颜色值。

Demo版下载地址:https://download.csdn.net/download/liaohaiyin/63234875

Newbeecoder.UI控件库根据用户需求开发稳定而高效项目,通过视频来演示控件库整体功能

先浏览一下颜色选择器效果和调用代码:

调用代码

<NbColorPicker Width="90" Height="32" Margin="4" Text="主题色" Style="{DynamicResource DefaultColorPickerStyle}" Color="{Binding Path=Color.Brand1, Source={x:Static NbTheme.Current}}"/>
<NbColorPicker Width="90" Height="32" Margin="4" Text="成功色" Style="{DynamicResource DefaultColorPickerStyle}" Color="{Binding Path=Color.Success1, Source={x:Static NbTheme.Current}}"/>
<NbColorPicker Width="90" Height="32" Margin="4" Text="信息色" Style="{DynamicResource DefaultColorPickerStyle}" Color="{Binding Path=Color.Info1, Source={x:Static NbTheme.Current}}"/>
<NbColorPicker Width="90" Height="32" Margin="4" Text="警告色" Style="{DynamicResource DefaultColorPickerStyle}" Color="{Binding Path=Color.Warning1, Source={x:Static NbTheme.Current}}"/>
<NbColorPicker Width="90" Height="32" Margin="4" Text="危险色" Style="{DynamicResource DefaultColorPickerStyle}" Color="{Binding Path=Color.Danger1, Source={x:Static NbTheme.Current}}"/>