DaisyDropdown

Overview

DaisyDropdown is a lightweight dropdown menu control built on a Popup. It displays a trigger area with a placeholder/selection, and shows a menu (via DaisyMenu) when opened. Use it for compact menu-style pickers and small action lists.

Properties

Property Description
ItemsSource (IEnumerable?) Items displayed in the dropdown menu.
SelectedItem (object?) Currently selected item. When set/bound, the trigger shows this item.
PlaceholderText (string?) Text shown when SelectedItem is null (default Select).
IsOpen (bool) Controls whether the popup is open.
PlacementMode (PlacementMode) Popup placement relative to the trigger (default Bottom).
CloseOnSelection (bool) Closes the dropdown after selecting an item (default True).
Size (DaisySize) Size preset (affects height and font size).

Events

Event Description
SelectedItemChanged Raised when the selected item changes. Handler signature: void OnSelectedItemChanged(object? sender, DaisyDropdownSelectionChangedEventArgs e) (use e.SelectedItem).

Quick Examples

<!-- Simple string list -->
<controls:DaisyDropdown PlaceholderText="Pick one"
                       ItemsSource="{Binding Options}"
                       SelectedItem="{Binding SelectedOption, Mode=TwoWay}" />

<!-- Keep open after selection -->
<controls:DaisyDropdown CloseOnSelection="False"
                       ItemsSource="{Binding Actions}" />

<!-- Compact size -->
<controls:DaisyDropdown Size="Small" ItemsSource="{Binding Options}" />

Tips & Best Practices