Class SfDropDownColorPalette
Represents a control that lets a user to pick a Microsoft.UI.Xaml.Media.SolidColorBrush from a list of available colors from a dropdown.
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Editors
Assembly: Syncfusion.Editors.WinUI.dll
Syntax
public class SfDropDownColorPalette : SfDropDownBase, IDisposable
Examples
<syncfusion:SfDropDownColorPalette>
<syncfusion:SfDropDownColorPalette.SelectedBrush>
<SolidColorBrush Color="Green"/>
</syncfusion:SfDropDownColorPalette.SelectedBrush>
<syncfusion:SfDropDownColorPalette.ContentTemplate>
<DataTemplate>
<StackPanel>
<Path Data="{StaticResource paint}"/>
<Rectangle Fill="{Binding}"/>
</StackPanel>
</DataTemplate>
</syncfusion:SfDropDownColorPalette.ContentTemplate>
</syncfusion:SfDropDownColorPalette>
SfDropDownColorPalette
configured to show Blue
palette and hide more color and no color buttons.
<editor:SfDropDownColorPalette>
<FlyoutBase.AttachedFlyout>
<editor:DropDownFlyout>
<editor:SfColorPalette
ActivePalette="Blue"
ShowMoreColorsButton="False"
ShowNoColorButton="False"/>
</editor:DropDownFlyout>
</FlyoutBase.AttachedFlyout>
</editor:SfDropDownColorPalette>
Constructors
SfDropDownColorPalette()
Initializes a new instance of the SfDropDownColorPalette class.
Declaration
public SfDropDownColorPalette()
Fields
CommandProperty
Identifies Command dependency property.
Declaration
public static readonly DependencyProperty CommandProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
SelectedBrushProperty
Identifies SelectedBrush dependency property.
Declaration
public static readonly DependencyProperty SelectedBrushProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Properties
Command
Gets or sets the command to invoke, when primary button is pressed or SelectedBrush is changed.
Declaration
public ICommand Command { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Remarks
Default value is null. In DropDown mode, this command is invoked only when SelectedBrush is changed. In Split mode, this command is invoked when SelectedBrush is changed and when primary button is clicked.
SelectedBrush
Gets or sets the value of SeletedBrush.
Declaration
public Brush SelectedBrush { get; set; }
Property Value
Type |
---|
Microsoft.UI.Xaml.Media.Brush |
Methods
Dispose(Boolean)
Release the unmanaged resources of SfDropDownBase.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Used to indicate perform dispose or not. |
Overrides
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
---|
Microsoft.UI.Xaml.Automation.Peers.AutomationPeer |
OnPrimaryButtonClicked()
Called when primary button is clicked.
Declaration
protected override void OnPrimaryButtonClicked()
Overrides
Events
SelectedBrushChanged
Occurs when value of selected brush has been changed.
Declaration
public event EventHandler<SelectedBrushChangedEventArgs> SelectedBrushChanged
Event Type
Type |
---|
System.EventHandler<SelectedBrushChangedEventArgs> |