menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfDropDownBase - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfDropDownBase

    Represents a base class which is used to create a custom picker controls like SfDropDownColorPalette, SfDropDownColorPicker, SfDatePicker and SfTimePicker.

    Inheritance
    System.Object
    SfDropDownBase
    SfCalendarDateRangePicker
    DateTimePickerBase
    SfDropDownColorPalette
    SfDropDownColorPicker
    SfPicker
    Implements
    System.IDisposable
    Namespace: Syncfusion.UI.Xaml.Editors
    Assembly: Syncfusion.Editors.WinUI.dll
    Syntax
    public abstract class SfDropDownBase : Control, IDisposable

    Constructors

    SfDropDownBase()

    Initializes a new instance of the SfDropDownBase class.

    Declaration
    public SfDropDownBase()

    Fields

    ContentProperty

    Identifies Content dependency property.

    Declaration
    public static readonly DependencyProperty ContentProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    ContentTemplateProperty

    Identifies ContentTemplate dependency property.

    Declaration
    public static readonly DependencyProperty ContentTemplateProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    DropDownButtonTemplateProperty

    Identifies DropDownButtonTemplate dependency property.

    Declaration
    public static readonly DependencyProperty DropDownButtonTemplateProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    DropDownHeightProperty

    Identifies DropDownHeight dependency property.

    Declaration
    public static readonly DependencyProperty DropDownHeightProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    DropDownModeProperty

    Identifies DropDownMode dependency property.

    Declaration
    public static readonly DependencyProperty DropDownModeProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    DropDownPlacementProperty

    Identifies DropDownPlacement dependency property.

    Declaration
    public static readonly DependencyProperty DropDownPlacementProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    IsOpenProperty

    Identifies IsOpen dependency property.

    Declaration
    public static readonly DependencyProperty IsOpenProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    ShowDropDownButtonProperty

    Identifies ShowDropDownButton dependency property.

    Declaration
    public static readonly DependencyProperty ShowDropDownButtonProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    ShowSubmitButtonsProperty

    Identifies ShowSubmitButtons dependency property.

    Declaration
    public static readonly DependencyProperty ShowSubmitButtonsProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    Properties

    Content

    Gets or sets the content of the primary button in SfDropDownBase control.

    Declaration
    public object Content { get; set; }
    Property Value
    Type
    System.Object
    Remarks

    ContentTemplate is used to customize the UI of Content.

    ContentTemplate

    Gets or sets the data template that is used to display the content of SfDropDownBase.

    Declaration
    public DataTemplate ContentTemplate { get; set; }
    Property Value
    Type
    Microsoft.UI.Xaml.DataTemplate
    Remarks

    The Content is the data context of ContentTemplate.

    DropDownButtonTemplate

    Gets or sets the template for the drop down button (aka secondary button) in SfDropDownBase control.

    Declaration
    public DataTemplate DropDownButtonTemplate { get; set; }
    Property Value
    Type
    Microsoft.UI.Xaml.DataTemplate
    Remarks

    DataContext is null for this template.

    DropDownHeight

    Gets or sets the height of the drop down popup in SfDropDownBase control.

    Declaration
    public double DropDownHeight { get; set; }
    Property Value
    Type Description
    System.Double

    The default value is Auto. When DropDownHeight is auto, popup height changes based on size required by flyout content.

    DropDownMode

    Gets or sets a value that indicates whether to display control as SplitButton or DropDown.

    Declaration
    public DropDownMode DropDownMode { get; set; }
    Property Value
    Type Description
    DropDownMode

    The default value is DropDown.

    Remarks

    In DropDown mode, control opens the flyout. In Split mode, control represents a button with two parts that can be invoked separately. One part behaves like a standard button and the other part invokes a flyout.

    DropDownPlacement

    Gets or sets a value indicating the placement of drop-down, when it opens.

    Declaration
    public FlyoutPlacementMode DropDownPlacement { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Controls.Primitives.FlyoutPlacementMode

    The default value is Microsoft.UI.Xaml.Controls.Primitives.FlyoutPlacementMode.Bottom.

    IsOpen

    Gets or sets a value indicating whether the flyout is open or close.

    Declaration
    public bool IsOpen { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is false.

    ShowDropDownButton

    Gets or sets a value indicating whether to show or hide the drop down button in SfDropDownBase control.

    Declaration
    public bool ShowDropDownButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true.

    ShowSubmitButtons

    Gets or sets a value indicating whether to show or hide the Accept and Decline button in SfDropDownBase control.

    Declaration
    public bool ShowSubmitButtons { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true. Accept and Decline button is shown below flyout content. OnAcceptButtonClicked() virtual method will be called, when Accept button is clicked. OnDeclineButtonClicked() virtual method will be called, when Decline button is clicked.

    Methods

    CloseDropDown()

    Called when closing the drop-down.

    Declaration
    protected virtual void CloseDropDown()

    Dispose()

    Release the unmanaged resources of SfDropDownBase.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Release the unmanaged resources of SfDropDownBase.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Used to indicate perform dispose or not.

    OnAcceptButtonClicked()

    Called when Accept button is clicked.

    Declaration
    protected virtual void OnAcceptButtonClicked()

    OnApplyTemplate()

    Declaration
    protected override void OnApplyTemplate()

    OnDeclineButtonClicked()

    Called when Decline button is clicked.

    Declaration
    protected virtual void OnDeclineButtonClicked()

    OnKeyDown(KeyRoutedEventArgs)

    Declaration
    protected override void OnKeyDown(KeyRoutedEventArgs e)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e

    OnKeyUp(KeyRoutedEventArgs)

    Declaration
    protected override void OnKeyUp(KeyRoutedEventArgs e)
    Parameters
    Type Name Description
    Microsoft.UI.Xaml.Input.KeyRoutedEventArgs e

    OnPrimaryButtonClicked()

    Called when primary button is clicked.

    Declaration
    protected virtual void OnPrimaryButtonClicked()

    OpenDropDown()

    Called when opening the drop-down.

    Declaration
    protected virtual void OpenDropDown()

    Events

    DropDownClosed

    Occurs when drop down is closed.

    Declaration
    public event EventHandler DropDownClosed
    Event Type
    Type
    System.EventHandler
    Remarks

    Drop-down can be opened by clicking drop-down button, pressing Alt + Down key, F4 key. Drop-down will be closed when Esc key is pressed or when focus is lost.

    DropDownOpened

    Occurs when drop down is opened.

    Declaration
    public event EventHandler DropDownOpened
    Event Type
    Type
    System.EventHandler
    Remarks

    Drop-down can be opened by clicking drop-down button or pressing Alt + Down key, F4 key. Drop-down will be closed when Esc key is pressed or when focus is lost.

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved