-
-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathComboBox.fs
More file actions
32 lines (22 loc) · 1.69 KB
/
Copy pathComboBox.fs
File metadata and controls
32 lines (22 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
namespace Avalonia.FuncUI.DSL
[<AutoOpen>]
module ComboBox =
open Avalonia.Controls
open Avalonia.Layout
open Avalonia.FuncUI.Types
open Avalonia.FuncUI.Builder
let create (attrs: IAttr<ComboBox> list): IView<ComboBox> =
ViewBuilder.Create<ComboBox>(attrs)
type ComboBox with
static member isDropDownOpen<'t when 't :> ComboBox>(value: bool) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<bool>(ComboBox.IsDropDownOpenProperty, value, ValueNone)
static member horizontalContentAlignment<'t when 't :> ComboBox>(alignment: HorizontalAlignment) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<HorizontalAlignment>(ComboBox.HorizontalContentAlignmentProperty, alignment, ValueNone)
static member maxDropDownHeight<'t when 't :> ComboBox>(height: float) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<float>(ComboBox.MaxDropDownHeightProperty, height, ValueNone)
static member verticalContentAlignment<'t when 't :> ComboBox>(alignment: VerticalAlignment) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<VerticalAlignment>(ComboBox.VerticalContentAlignmentProperty, alignment, ValueNone)
static member virtualizationMode<'t when 't :> ComboBox>(mode: ItemVirtualizationMode) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<ItemVirtualizationMode>(ComboBox.VirtualizationModeProperty, mode, ValueNone)
static member controlledSelectedIndex<'t when 't :> ComboBox>(value: int, onChange: int -> unit) =
AttrBuilder<'t>.CreateControlledProperty<int>(ComboBox.SelectedIndexProperty, value, onChange, ValueNone)