Blazor的Telerik UI?下载30天免费试用

FlatColorPicker事件

本文描述了用于Blazor的Telerik FlatColorPicker的可用事件。

OnChange

OnChange事件触发时,用户提交他们的选择:

  • 应用或取消按钮单击
  • 输入键盘按键

注意OnChange事件也可能在实际选择的颜色没有改变时触发。

事件类型为EventCallback <对象>.的OnChange对象的双向绑定价值属性。

@*处理FlatColorPickerOnChange事件*@ 

@ eventlog

@code {string颜色{get;设置;} string EventLog {get;设置;} async任务FlatColorPickerOnChange(对象newColor) {EventLog =字符串。Format("The selected color is: {0}", (string)newColor);}}

ValueChanged

ValueChanged事件在用户选择新颜色且组件值发生变化时触发。

事件类型为EventCallback <字符串>.使用ValueChanged类型的单向绑定价值在事件处理程序中更新属性和手动值。

@*处理FlatColorPickerValueChanged事件*@  @code {string颜色{get;设置;} async任务FlatColorPickerValueChanged(string newColor) {Color = newColor;}}

ViewChanged

ViewChanged事件在用户在组件视图之间切换时触发。

事件类型为EventCallback < ColorPickerView >.使用ViewChanged类型的单向绑定视图在事件处理程序中更新属性和手动值。

@*处理FlatColorPickerViewChanged事件*@  @code {string Color {get;设置;} ColorPickerView查看{获取;设置;} async任务FlatColorPickerViewChanged(ColorPickerView newView){视图= newView;}}

另请参阅

在本文中
Baidu
map