共用方式為


ColorPicker.ColorChanged 事件

定義

發生于 Color 屬性變更時。

適用于 UWP 的對等 WinUI 2 APIMicrosoft.UI.Xaml.Controls.ColorPicker.ColorChanged (Windows 應用程式 SDK中的 WinUI,請參閱Windows 應用程式 SDK命名空間) 。

// Register
event_token ColorChanged(TypedEventHandler<ColorPicker, ColorChangedEventArgs const&> const& handler) const;

// Revoke with event_token
void ColorChanged(event_token const* cookie) const;

// Revoke with event_revoker
ColorPicker::ColorChanged_revoker ColorChanged(auto_revoke_t, TypedEventHandler<ColorPicker, ColorChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<ColorPicker,ColorChangedEventArgs> ColorChanged;
function onColorChanged(eventArgs) { /* Your code */ }
colorPicker.addEventListener("colorchanged", onColorChanged);
colorPicker.removeEventListener("colorchanged", onColorChanged);
- or -
colorPicker.oncolorchanged = onColorChanged;
Public Custom Event ColorChanged As TypedEventHandler(Of ColorPicker, ColorChangedEventArgs) 
<ColorPicker ColorChanged="eventhandler" .../>

事件類型

適用於