|
| 1 | +namespace Avalonia.FuncUI.DSL |
| 2 | + |
| 3 | +open Avalonia.Controls |
| 4 | +open Avalonia.FuncUI.Types |
| 5 | +open Avalonia.FuncUI.Builder |
| 6 | +open Avalonia.Controls.Models.TreeDataGrid |
| 7 | +open Avalonia.Controls.Primitives |
| 8 | +open System |
| 9 | + |
| 10 | +[<AutoOpen>] |
| 11 | +module TreeDataGrid = |
| 12 | + |
| 13 | + let create (attrs: IAttr<TreeDataGrid> list): IView<TreeDataGrid> = |
| 14 | + ViewBuilder.Create<TreeDataGrid>(attrs) |
| 15 | + |
| 16 | + type TreeDataGrid with |
| 17 | + |
| 18 | + static member autoDragDropRows<'t when 't :> TreeDataGrid>(autoDragDropRows: bool) : IAttr<'t> = |
| 19 | + AttrBuilder<'t>.CreateProperty<bool>(TreeDataGrid.AutoDragDropRowsProperty, autoDragDropRows, ValueNone) |
| 20 | + |
| 21 | + static member canUserResizeColumns<'t when 't :> TreeDataGrid>(canUserResizeColumns: bool) : IAttr<'t> = |
| 22 | + AttrBuilder<'t>.CreateProperty<bool>(TreeDataGrid.CanUserResizeColumnsProperty, canUserResizeColumns, ValueNone) |
| 23 | + |
| 24 | + static member canUserSortColumns<'t when 't :> TreeDataGrid>(canUserSortColumns: bool) : IAttr<'t> = |
| 25 | + AttrBuilder<'t>.CreateProperty<bool>(TreeDataGrid.CanUserSortColumnsProperty, canUserSortColumns, ValueNone) |
| 26 | + |
| 27 | + static member columns<'t when 't :> TreeDataGrid>(columns: IColumns) : IAttr<'t> = |
| 28 | + AttrBuilder<'t>.CreateProperty<IColumns>(TreeDataGrid.ColumnsProperty, columns, ValueNone) |
| 29 | + |
| 30 | + static member elementFactory<'t when 't :> TreeDataGrid>(factory: TreeDataGridElementFactory) : IAttr<'t> = |
| 31 | + AttrBuilder<'t>.CreateProperty<TreeDataGridElementFactory>(TreeDataGrid.ElementFactoryProperty, factory, ValueNone) |
| 32 | + |
| 33 | + static member rows<'t when 't :> TreeDataGrid>(rows: IRows) : IAttr<'t> = |
| 34 | + AttrBuilder<'t>.CreateProperty<IRows>(TreeDataGrid.RowsProperty, rows, ValueNone) |
| 35 | + |
| 36 | + static member scroll<'t when 't :> TreeDataGrid>(scrollable: IScrollable) : IAttr<'t> = |
| 37 | + AttrBuilder<'t>.CreateProperty<IScrollable>(TreeDataGrid.ScrollProperty, scrollable, ValueNone) |
| 38 | + |
| 39 | + static member showColumnHeaders<'t when 't :> TreeDataGrid>(showHeaders: bool) : IAttr<'t> = |
| 40 | + AttrBuilder<'t>.CreateProperty<bool>(TreeDataGrid.ShowColumnHeadersProperty, showHeaders, ValueNone) |
| 41 | + |
| 42 | + static member source<'t when 't :> TreeDataGrid>(dataSource: ITreeDataGridSource) : IAttr<'t> = |
| 43 | + AttrBuilder<'t>.CreateProperty<ITreeDataGridSource>(TreeDataGrid.SourceProperty, dataSource, ValueNone) |
| 44 | + |
| 45 | + static member rowDragStarted<'t when 't :> TreeDataGrid>(func: TreeDataGridRowDragStartedEventArgs -> unit, ?subPatchOptions) = |
| 46 | + AttrBuilder<'t>.CreateSubscription<TreeDataGridRowDragStartedEventArgs>(TreeDataGrid.RowDragStartedEvent, func, ?subPatchOptions = subPatchOptions) |
| 47 | + |
| 48 | + static member rowDragOver<'t when 't :> TreeDataGrid>(func: TreeDataGridRowDragEventArgs -> unit, ?subPatchOptions) = |
| 49 | + AttrBuilder<'t>.CreateSubscription<TreeDataGridRowDragEventArgs>(TreeDataGrid.RowDragOverEvent, func, ?subPatchOptions = subPatchOptions) |
| 50 | + |
| 51 | + static member rowDrop<'t when 't :> TreeDataGrid>(func: TreeDataGridRowDragEventArgs -> unit, ?subPatchOptions) = |
| 52 | + AttrBuilder<'t>.CreateSubscription<TreeDataGridRowDragEventArgs>(TreeDataGrid.RowDropEvent, func, ?subPatchOptions = subPatchOptions) |
| 53 | + |
0 commit comments