Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bindings Avalonia v11.0.0 #422

Merged
merged 59 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3c8684e
add Type Alias: SubscriptionFactory<'arg>
SilkyFowl May 3, 2024
8d89f93
Merge branch 'fsprojects:master' into master
SilkyFowl May 3, 2024
cdfba37
add SelectingItemsControl bindings.
SilkyFowl May 4, 2024
20d2612
add ComboBox bindings.
SilkyFowl May 4, 2024
fdc90e0
add HeaderedSelectingItemsControl bindings.
SilkyFowl May 4, 2024
a650d8c
add MenuItem bindings.
SilkyFowl May 4, 2024
e7aae22
add NumericUpDown bindings.
SilkyFowl May 4, 2024
b0abf8f
add TreeView bindings.
SilkyFowl May 4, 2024
57c803d
add HeaderedItemsControl bindings.
SilkyFowl May 4, 2024
9752107
add CalendarItem bindings.
SilkyFowl May 4, 2024
420d662
move CalendarItem.fs to DSL\Primitives
SilkyFowl May 4, 2024
0cc9265
add PickerPresenterBase bindings.
SilkyFowl May 4, 2024
3157b8e
add DatePickerPresenter bindings.
SilkyFowl May 4, 2024
95b7692
add TimePickerPresenter bindings.
SilkyFowl May 4, 2024
0c8168d
add ProgressBar bindings.
SilkyFowl May 5, 2024
6424137
add Slider bindings.
SilkyFowl May 5, 2024
a513505
add ScrollBar bindings.
SilkyFowl May 5, 2024
53c754a
add RemoteWidget bindings.
SilkyFowl May 6, 2024
82fba25
fix Shape bindings
SilkyFowl May 6, 2024
d5a8a76
add Arc bindings.
SilkyFowl May 6, 2024
6a3d641
add Rectangle bindings.
SilkyFowl May 6, 2024
1691053
add Sector bindings.
SilkyFowl May 6, 2024
baf755c
update Sector bindings.
SilkyFowl May 6, 2024
7668504
add BindingEvaluator bindings.
SilkyFowl May 7, 2024
c268b22
add LightDismissOverlayLayer bindings.
SilkyFowl May 7, 2024
8b72866
add ExperimentalAcrylicBorder bindings.
SilkyFowl May 7, 2024
3446b3c
add ThemeVariantScope bindings.
SilkyFowl May 7, 2024
6bbc3b3
add VisualLayerManager bindings.
SilkyFowl May 7, 2024
e9f5740
add NativeControlHost bindings.
SilkyFowl May 7, 2024
7e17cfe
add AdornerLayer bindings.
SilkyFowl May 7, 2024
0b65342
add OverlayLayer bindings.
SilkyFowl May 7, 2024
57bc973
add DataGridFrozenGrid bindings.
SilkyFowl May 8, 2024
18902b5
add StackPanel bindings.
SilkyFowl May 8, 2024
fd1b900
add ReversibleStackPanel bindings.
SilkyFowl May 8, 2024
b4e16fd
add VirtualizingCarouselPanel bindings.
SilkyFowl May 8, 2024
ddf8842
add VirtualizingStackPanel bindings.
SilkyFowl May 8, 2024
b894240
add ChromeOverlayLayer bindings.
SilkyFowl May 8, 2024
5b290ac
add SelectableTextBlock bindings.
SilkyFowl May 8, 2024
223b8ed
fix TickBar.ticks(value: seq<float>) binding implementation.
SilkyFowl May 8, 2024
b3773bc
add ContentPresenter bindings.
SilkyFowl May 8, 2024
f810b3e
add ScrollContentPresenter bindings.
SilkyFowl May 8, 2024
4270ba2
add ItemsPresenter bindings.
SilkyFowl May 8, 2024
ff60da9
add TextPresenter bindings.
SilkyFowl May 8, 2024
2bd1aad
add Popup bindings.
SilkyFowl May 8, 2024
b577366
add AutoCompleteBox bindings.
SilkyFowl May 8, 2024
d479114
add Calendar bindings.
SilkyFowl May 9, 2024
a6368b8
add CalendarDatePicker bindings.
SilkyFowl May 11, 2024
cc132b8
add Button bindings.
SilkyFowl May 11, 2024
b761ed1
add DropDownButton bindings.
SilkyFowl May 11, 2024
927160c
add CalendarButton bindings.
SilkyFowl May 11, 2024
5fd7145
add CalendarDayButton bindings.
SilkyFowl May 11, 2024
1e19748
add ToggleSwitch bindings.
SilkyFowl May 11, 2024
7c13a04
add DataValidationErrors bindings.
SilkyFowl May 11, 2024
4ba2f62
add RefreshContainer bindings.
SilkyFowl May 13, 2024
beb13e7
add RefreshVisualizer bindings.
SilkyFowl May 14, 2024
1160f26
update ScrollViewer bindings.
SilkyFowl May 14, 2024
9b4a6fa
add ToggleSplitButton bindings.
SilkyFowl May 14, 2024
cd4d413
add SplitView bindings.
SilkyFowl May 14, 2024
c68392e
add Expander bindings.
SilkyFowl May 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Avalonia.FuncUI/Avalonia.FuncUI.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
<Compile Include="DSL\Primitives\Thumb.fs" />
<Compile Include="DSL\Primitives\AccessText.fs" />
<Compile Include="DSL\Primitives\ScrollBar.fs" />
<Compile Include="DSL\Primitives\CalendarItem.fs" />
<Compile Include="DSL\Primitives\PickerPresenterBase.fs" />
<Compile Include="DSL\Primitives\TextElement.fs" />
<Compile Include="DSL\Panels\Canvas.fs" />
<Compile Include="DSL\Panels\DockPanel.fs" />
Expand Down Expand Up @@ -138,6 +140,8 @@
<Compile Include="DSL\ContextMenu.fs" />
<Compile Include="DSL\MenuItem.fs" />
<Compile Include="DSL\GridSplitter.fs" />
<Compile Include="DSL\DatePickerPresenter.fs" />
<Compile Include="DSL\TimePickerPresenter.fs" />
<Compile Include="DSL\ProgressBar.fs" />
<Compile Include="DSL\ScrollViewer.fs" />
<Compile Include="DSL\Separator.fs" />
Expand Down
43 changes: 41 additions & 2 deletions src/Avalonia.FuncUI/DSL/ComboBox.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,42 @@ namespace Avalonia.FuncUI.DSL
module ComboBox =
open Avalonia.Controls
open Avalonia.Layout
open Avalonia.Media
open Avalonia.Media.Immutable
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 onDropDownClosed<'t when 't :> ComboBox>(func: 't -> unit, ?subPatchOptions) =
let name = nameof Unchecked.defaultof<'t>.DropDownClosed

let factory: SubscriptionFactory<'t> =
fun (control, func, token) ->
let control = control :?> 't
let handler = System.EventHandler(fun s _ -> func (s :?> 't))
let event = control.DropDownClosed

event.AddHandler(handler)
token.Register(fun _ -> event.RemoveHandler(handler)) |> ignore

AttrBuilder<'t>.CreateSubscription<'t>(name, factory, func, ?subPatchOptions = subPatchOptions)

static member onDropDownOpened<'t when 't :> ComboBox>(func: 't -> unit, ?subPatchOptions) =
let name = nameof Unchecked.defaultof<'t>.DropDownOpened

let factory: SubscriptionFactory<'t> =
fun (control, func, token) ->
let control = control :?> 't
let handler = System.EventHandler(fun s _ -> func (s :?> 't))
let event = control.DropDownOpened

event.AddHandler(handler)
token.Register(fun _ -> event.RemoveHandler(handler)) |> ignore

AttrBuilder<'t>.CreateSubscription<'t>(name, factory, func, ?subPatchOptions = subPatchOptions)
static member isDropDownOpen<'t when 't :> ComboBox>(value: bool) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<bool>(ComboBox.IsDropDownOpenProperty, value, ValueNone)

Expand All @@ -20,6 +48,17 @@ module ComboBox =

static member maxDropDownHeight<'t when 't :> ComboBox>(height: float) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<float>(ComboBox.MaxDropDownHeightProperty, height, ValueNone)


static member placeholderText<'t when 't :> ComboBox>(text: string) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<string>(ComboBox.PlaceholderTextProperty, text, ValueNone)

static member placeholderForeground<'t when 't :> ComboBox>(value: IBrush) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<IBrush>(ComboBox.PlaceholderForegroundProperty, value, ValueNone)

static member placeholderForeground<'t when 't :> ComboBox>(color:string) : IAttr<'t> =
color |> Color.Parse |> ImmutableSolidColorBrush |> ComboBox.placeholderForeground

static member placeholderForeground<'t when 't :> ComboBox>(color:Color) : IAttr<'t> =
color |> ImmutableSolidColorBrush |> ComboBox.placeholderForeground
static member verticalContentAlignment<'t when 't :> ComboBox>(alignment: VerticalAlignment) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<VerticalAlignment>(ComboBox.VerticalContentAlignmentProperty, alignment, ValueNone)
49 changes: 49 additions & 0 deletions src/Avalonia.FuncUI/DSL/DatePickerPresenter.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
namespace Avalonia.FuncUI.DSL

open System
open Avalonia.Controls

[<AutoOpen>]
module DatePickerPresenter =
open Avalonia.FuncUI.Types
open Avalonia.FuncUI.Builder

let create (attrs: IAttr<DatePickerPresenter> list): IView<DatePickerPresenter> =
ViewBuilder.Create<DatePickerPresenter>(attrs)

type DatePickerPresenter with
/// Gets or sets the current Date for the picker
static member date<'t when 't :> DatePickerPresenter>(value: DateTimeOffset) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<DateTimeOffset>(DatePickerPresenter.DateProperty, value, ValueNone)

/// Gets or sets the DayFormat
static member dayFormat<'t when 't :> DatePickerPresenter>(value: string) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<string>(DatePickerPresenter.DayFormatProperty, value, ValueNone)

/// Get or sets whether the Day selector is visible
static member dayVisible<'t when 't :> DatePickerPresenter>(value: bool) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<bool>(DatePickerPresenter.DayVisibleProperty, value, ValueNone)

/// Gets or sets the maximum pickable year
static member maxYear<'t when 't :> DatePickerPresenter>(value: DateTimeOffset) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<DateTimeOffset>(DatePickerPresenter.MaxYearProperty, value, ValueNone)

/// Gets or sets the minimum pickable year
static member minYear<'t when 't :> DatePickerPresenter>(value: DateTimeOffset) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<DateTimeOffset>(DatePickerPresenter.MinYearProperty, value, ValueNone)

/// Gets or sets the month format
static member monthFormat<'t when 't :> DatePickerPresenter>(value: string) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<string>(DatePickerPresenter.MonthFormatProperty, value, ValueNone)

/// Gets or sets whether the month selector is visible
static member monthVisible<'t when 't :> DatePickerPresenter>(value: bool) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<bool>(DatePickerPresenter.MonthVisibleProperty, value, ValueNone)

/// Gets or sets the year format
static member yearFormat<'t when 't :> DatePickerPresenter>(value: string) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<string>(DatePickerPresenter.YearFormatProperty, value, ValueNone)

/// Gets or sets whether the year selector is visible
static member yearVisible<'t when 't :> DatePickerPresenter>(value: bool) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<bool>(DatePickerPresenter.YearVisibleProperty, value, ValueNone)
3 changes: 3 additions & 0 deletions src/Avalonia.FuncUI/DSL/MenuItem.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ module MenuItem =
static member isSubMenuOpen<'t when 't :> MenuItem>(value: bool) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<bool>(MenuItem.IsSubMenuOpenProperty, value, ValueNone)

static member staysOpenOnClick<'t when 't :> MenuItem>(value: bool) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<bool>(MenuItem.StaysOpenOnClickProperty, value, ValueNone)

static member onIsSubMenuOpenChanged<'t when 't :> MenuItem>(func: bool -> unit, ?subPatchOptions) =
AttrBuilder<'t>.CreateSubscription<bool>(MenuItem.IsSubMenuOpenProperty, func, ?subPatchOptions = subPatchOptions)

Expand Down
9 changes: 9 additions & 0 deletions src/Avalonia.FuncUI/DSL/NumericUpDown.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module NumericUpDown =
open Avalonia.Controls
open Avalonia.FuncUI.Types
open Avalonia.FuncUI.Builder
open Avalonia.Data.Converters
open Avalonia.Layout

let create (attrs: IAttr<NumericUpDown> list): IView<NumericUpDown> =
ViewBuilder.Create<NumericUpDown>(attrs)
Expand Down Expand Up @@ -76,6 +78,9 @@ module NumericUpDown =

AttrBuilder<'t>.CreateProperty<string>("Text", value, ValueSome getter, ValueSome setter, ValueNone)

static member textConverter<'t when 't :> NumericUpDown>(value: IValueConverter) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<IValueConverter>(NumericUpDown.TextConverterProperty, value, ValueNone)

static member onTextChanged<'t when 't :> NumericUpDown>(func: string -> unit, ?subPatchOptions) =
AttrBuilder<'t>.CreateSubscription<string>(NumericUpDown.TextProperty, func, ?subPatchOptions = subPatchOptions)

Expand All @@ -91,4 +96,8 @@ module NumericUpDown =
static member watermark<'t when 't :> NumericUpDown>(value: string) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<string>(NumericUpDown.WatermarkProperty, value, ValueNone)

static member horizontalContentAlignment<'t when 't :> NumericUpDown>(value: HorizontalAlignment) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<HorizontalAlignment>(NumericUpDown.HorizontalContentAlignmentProperty, value, ValueNone)

static member verticalContentAlignment<'t when 't :> NumericUpDown>(value: VerticalAlignment) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<VerticalAlignment>(NumericUpDown.VerticalContentAlignmentProperty, value, ValueNone)
40 changes: 40 additions & 0 deletions src/Avalonia.FuncUI/DSL/Primitives/CalendarItem.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
namespace Avalonia.FuncUI.DSL

[<AutoOpen>]
module CalendarItem =
open Avalonia.Controls.Primitives
open Avalonia.Controls.Templates
open Avalonia.Media
open Avalonia.Media.Immutable
open Avalonia.FuncUI.Types
open Avalonia.FuncUI.Builder

let create (attrs: IAttr<CalendarItem> list): IView<CalendarItem> =
ViewBuilder.Create<CalendarItem>(attrs)

type CalendarItem with

/// <summary>Set the background color of the header</summary>
///
/// <remarks>Because of CalendarItem is sealed, this binding is only for CalendarItem</remarks>
static member headerBackground(value: IBrush) : IAttr<CalendarItem> =
AttrBuilder<CalendarItem>.CreateProperty<IBrush>(CalendarItem.HeaderBackgroundProperty, value, ValueNone)


/// <summary>Set the background color of the header</summary>
///
/// <remarks>Because of CalendarItem is sealed, this binding is only for CalendarItem</remarks>
static member headerBackground(color: string) : IAttr<CalendarItem> =
color |> Color.Parse |> ImmutableSolidColorBrush |> CalendarItem.headerBackground

/// <summary>Set the foreground color of the header</summary>
///
/// <remarks>Because of CalendarItem is sealed, this binding is only for CalendarItem</remarks>
static member headerForeground(color: Color) : IAttr<CalendarItem> =
color |> ImmutableSolidColorBrush |> CalendarItem.headerBackground

/// <summary>Set day title template.</summary>
///
/// <remarks>Because of CalendarItem is sealed, this binding is only for CalendarItem</remarks>
static member dayTitleTemplate(value: IDataTemplate) : IAttr<CalendarItem> =
AttrBuilder<CalendarItem>.CreateProperty<IDataTemplate>(CalendarItem.DayTitleTemplateProperty, value, ValueNone)
6 changes: 5 additions & 1 deletion src/Avalonia.FuncUI/DSL/Primitives/HeaderedItemsControl.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[<AutoOpen>]
module HeaderedItemsControl =
open Avalonia.Controls.Primitives
open Avalonia.Controls.Templates
open Avalonia.FuncUI.Types
open Avalonia.FuncUI.Builder

Expand All @@ -21,4 +22,7 @@ module HeaderedItemsControl =
AttrBuilder<'t>.CreateContentSingle(HeaderedItemsControl.HeaderProperty, value)

static member header<'t when 't :> HeaderedItemsControl>(value: IView) : IAttr<'t> =
value |> Some |> HeaderedItemsControl.header
value |> Some |> HeaderedItemsControl.header

static member headerTemplate<'t when 't :> HeaderedItemsControl>(value: IDataTemplate) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<IDataTemplate>(HeaderedItemsControl.HeaderTemplateProperty, value, ValueNone)
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namespace Avalonia.FuncUI.DSL
[<AutoOpen>]
module HeaderedSelectingItemsControl =
open Avalonia.Controls.Primitives
open Avalonia.Controls.Templates
open Avalonia.FuncUI.Types
open Avalonia.FuncUI.Builder

Expand All @@ -20,4 +21,7 @@ module HeaderedSelectingItemsControl =
AttrBuilder<'t>.CreateContentSingle(HeaderedSelectingItemsControl.HeaderProperty, value)

static member header<'t when 't :> HeaderedSelectingItemsControl>(value: IView) : IAttr<'t> =
value |> Some |> HeaderedSelectingItemsControl.header
value |> Some |> HeaderedSelectingItemsControl.header

static member headerTemplate<'t when 't :> HeaderedSelectingItemsControl>(value: IDataTemplate) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<IDataTemplate>(HeaderedSelectingItemsControl.HeaderTemplateProperty, value, ValueNone)
34 changes: 34 additions & 0 deletions src/Avalonia.FuncUI/DSL/Primitives/PickerPresenterBase.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
namespace Avalonia.FuncUI.DSL

[<AutoOpen>]
module PickerPresenterBase =
open System
open Avalonia.Controls.Primitives
open Avalonia.FuncUI.Builder

type PickerPresenterBase with
static member onConfirmed<'t when 't :> PickerPresenterBase>(func: 't -> unit, ?subPatchOptions) =
let name = nameof Unchecked.defaultof<'t>.Confirmed
let factory: SubscriptionFactory<'t> =
fun (control, func, token) ->
let control = control :?> 't
let handler = EventHandler(fun s e -> func(s :?> 't))
let event = control.Confirmed

event.AddHandler(handler)
token.Register(fun _ -> event.RemoveHandler(handler)) |> ignore

AttrBuilder<'t>.CreateSubscription<'t>(name, factory, func, ?subPatchOptions = subPatchOptions)

static member onDismissed<'t when 't :> PickerPresenterBase>(func: 't -> unit, ?subPatchOptions) =
let name = nameof Unchecked.defaultof<'t>.Dismissed
let factory: SubscriptionFactory<'t> =
fun (control, func, token) ->
let control = control :?> 't
let handler = EventHandler(fun s e -> func(s :?> 't))
let event = control.Dismissed

event.AddHandler(handler)
token.Register(fun _ -> event.RemoveHandler(handler)) |> ignore

AttrBuilder<'t>.CreateSubscription<'t>(name, factory, func, ?subPatchOptions = subPatchOptions)
45 changes: 38 additions & 7 deletions src/Avalonia.FuncUI/DSL/Primitives/ScrollBar.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,67 @@ namespace Avalonia.FuncUI.DSL

[<AutoOpen>]
module ScrollBar =
open System
open Avalonia.Layout
open Avalonia.Controls.Primitives
open Avalonia.FuncUI.Types
open Avalonia.FuncUI.Builder

let create (attrs: IAttr<ScrollBar> list): IView<ScrollBar> =
ViewBuilder.Create<ScrollBar>(attrs)

type ScrollBar with

static member onScroll<'t when 't :> ScrollBar>(func: ScrollEventArgs -> unit, ?subPatchOptions) : IAttr<'t> =
let name = nameof Unchecked.defaultof<'t>.Scroll
let factory: SubscriptionFactory<ScrollEventArgs> =
fun (control, func, token) ->
let content = control :?> 't
let handler = EventHandler<ScrollEventArgs>(fun sender args -> func args)
let event = content.Scroll

event.AddHandler(handler)
token.Register(fun () -> event.RemoveHandler(handler)) |> ignore

AttrBuilder<'t>.CreateSubscription<ScrollEventArgs>(name, factory, func, ?subPatchOptions = subPatchOptions)

/// <summary>
/// Gets a value that indicates whether the scrollbar can hide itself when user is not interacting with it.
/// </summary>
static member allowAutoHide<'t when 't :> ScrollBar>(value: bool) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<bool>(ScrollBar.AllowAutoHideProperty, value, ValueNone)

/// <summary>
/// Gets a value that determines how long will be the hide delay after user stops interacting with the scrollbar.
/// </summary>
static member hideDelay<'t when 't :> ScrollBar>(value: TimeSpan) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<TimeSpan>(ScrollBar.HideDelayProperty, value, ValueNone)

/// <summary>
/// Gets a value that indicates whether the scrollbar is expanded.
/// </summary>
static member isExpanded<'t when 't :> ScrollBar>(value: bool) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<bool>(ScrollBar.IsExpandedProperty, value, ValueNone)

/// <summary>
/// Sets the amount of the scrollable content that is currently visible.
/// </summary>
static member viewportSize<'t when 't :> ScrollBar>(value: double) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<double>(ScrollBar.ViewportSizeProperty, value, ValueNone)

/// <summary>
/// Sets a value that indicates whether the scrollbar should hide itself when it is not needed.
/// </summary>
/// </summary>
static member visibility<'t when 't :> ScrollBar>(visibility: ScrollBarVisibility) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<ScrollBarVisibility>(ScrollBar.VisibilityProperty, visibility, ValueNone)

/// <summary>
/// Sets the orientation of the scrollbar.
/// </summary>
static member orientation<'t when 't :> ScrollBar>(orientation: Orientation) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<Orientation>(ScrollBar.OrientationProperty, orientation, ValueNone)
AttrBuilder<'t>.CreateProperty<Orientation>(ScrollBar.OrientationProperty, orientation, ValueNone)

/// <summary>
/// Gets a value that determines how long will be the show delay when user starts interacting with the scrollbar.
/// </summary>
static member showDelay<'t when 't :> ScrollBar>(value: TimeSpan) : IAttr<'t> =
AttrBuilder<'t>.CreateProperty<TimeSpan>(ScrollBar.ShowDelayProperty, value, ValueNone)
Loading
Loading