-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Split MVU and Component view
- Loading branch information
Showing
411 changed files
with
7,631 additions
and
3,586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
extensions/Fabulous.Avalonia.ColorPicker/ColorPicker.Components.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Fabulous.Avalonia | ||
|
||
open Avalonia.Media | ||
open Fabulous | ||
open Fabulous.Avalonia | ||
|
||
[<AutoOpen>] | ||
module ComponentColorPickerBuilders = | ||
type Fabulous.Avalonia.View with | ||
/// <summary>Creates a ColorPicker widget.</summary> | ||
/// <param name="color">The Color value.</param> | ||
/// <param name="fn">Raised when the color changes.</param> | ||
static member ColorPicker(color: Color, fn: Color -> unit) = | ||
WidgetBuilder<'msg, IFabColorPicker>(ColorPicker.WidgetKey, ComponentColorView.ColorChanged.WithValue(ComponentValueEventData.create color fn)) |
15 changes: 15 additions & 0 deletions
15
extensions/Fabulous.Avalonia.ColorPicker/ColorPicker.Mvu.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Fabulous.Avalonia | ||
|
||
open Avalonia.Media | ||
open Fabulous | ||
open Fabulous.Avalonia | ||
|
||
|
||
[<AutoOpen>] | ||
module MvuColorPickerBuilders = | ||
type Fabulous.Avalonia.View with | ||
/// <summary>Creates a ColorPicker widget.</summary> | ||
/// <param name="color">The Color value.</param> | ||
/// <param name="fn">Raised when the color changes.</param> | ||
static member ColorPicker(color: Color, fn: Color -> 'msg) = | ||
WidgetBuilder<'msg, IFabColorPicker>(ColorPicker.WidgetKey, MvuColorView.ColorChanged.WithValue(ValueEventData.create color fn)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
extensions/Fabulous.Avalonia.ColorPicker/ColorPreviewer.Components.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Fabulous.Avalonia | ||
|
||
open Avalonia.Controls | ||
open Avalonia.Controls.Primitives | ||
open Fabulous | ||
open Fabulous.Avalonia | ||
|
||
module ComponentColorPreviewer = | ||
let ColorChanged = | ||
Attributes.defineEventNoDispatch "ColorPreviewer_ColorChanged" (fun target -> (target :?> ColorPreviewer).ColorChanged) | ||
|
||
[<AutoOpen>] | ||
module ComponentColorPreviewerBuilders = | ||
type Fabulous.Avalonia.View with | ||
|
||
/// <summary>Creates a ColorPreviewer widget.</summary> | ||
/// <param name="fn">Raised when the color changes.</param> | ||
static member ColorPreviewer(fn: ColorChangedEventArgs -> unit) = | ||
WidgetBuilder<'msg, IFabColorPreviewer>(ColorPreviewer.WidgetKey, ComponentColorPreviewer.ColorChanged.WithValue(fn)) |
18 changes: 18 additions & 0 deletions
18
extensions/Fabulous.Avalonia.ColorPicker/ColorPreviewer.Mvu.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Fabulous.Avalonia | ||
|
||
open Avalonia.Controls | ||
open Avalonia.Controls.Primitives | ||
open Fabulous | ||
open Fabulous.Avalonia | ||
|
||
module MvuColorPreviewer = | ||
let ColorChanged = | ||
Attributes.defineEvent "ColorPreviewer_ColorChanged" (fun target -> (target :?> ColorPreviewer).ColorChanged) | ||
|
||
[<AutoOpen>] | ||
module MvuColorPreviewerBuilders = | ||
type Fabulous.Avalonia.View with | ||
/// <summary>Creates a ColorPreviewer widget.</summary> | ||
/// <param name="fn">Raised when the color changes.</param> | ||
static member ColorPreviewer(fn: ColorChangedEventArgs -> 'msg) = | ||
WidgetBuilder<'msg, IFabColorPreviewer>(ColorPreviewer.WidgetKey, MvuColorPreviewer.ColorChanged.WithValue(fn)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
extensions/Fabulous.Avalonia.ColorPicker/ColorSlider.Components.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Fabulous.Avalonia | ||
|
||
open Avalonia.Controls.Primitives | ||
open Avalonia.Media | ||
open Fabulous | ||
open Fabulous.Avalonia | ||
|
||
module ComponentColorSlider = | ||
let ColorChanged = | ||
Attributes.defineAvaloniaPropertyWithChangedEventNoDispatch' "ColorSlider_ColorChanged" ColorSlider.ColorProperty | ||
|
||
[<AutoOpen>] | ||
module ComponentColorSliderBuilders = | ||
type Fabulous.Avalonia.View with | ||
/// <summary>Creates a ColorSlider widget.</summary> | ||
/// <param name="color">The Color value.</param> | ||
/// <param name="fn">Raised when the color changes.</param> | ||
static member ColorSlider(color: Color, fn: Color -> unit) = | ||
WidgetBuilder<'msg, IFabColorSlider>(ColorSlider.WidgetKey, ComponentColorSlider.ColorChanged.WithValue(ComponentValueEventData.create color fn)) |
20 changes: 20 additions & 0 deletions
20
extensions/Fabulous.Avalonia.ColorPicker/ColorSlider.Mvu.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Fabulous.Avalonia | ||
|
||
open Avalonia.Controls.Primitives | ||
open Avalonia.Media | ||
open Fabulous | ||
open Fabulous.Avalonia | ||
open Fabulous.StackAllocatedCollections.StackList | ||
|
||
module MvuColorSlider = | ||
let ColorChanged = | ||
Attributes.defineAvaloniaPropertyWithChangedEvent' "ColorSlider_ColorChanged" ColorSlider.ColorProperty | ||
|
||
[<AutoOpen>] | ||
module MvuColorSliderBuilders = | ||
type Fabulous.Avalonia.View with | ||
/// <summary>Creates a ColorSlider widget.</summary> | ||
/// <param name="color">The Color value.</param> | ||
/// <param name="fn">Raised when the color changes.</param> | ||
static member ColorSlider(color: Color, fn: Color -> 'msg) = | ||
WidgetBuilder<'msg, IFabColorSlider>(ColorSlider.WidgetKey, MvuColorSlider.ColorChanged.WithValue(ValueEventData.create color fn)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
extensions/Fabulous.Avalonia.ColorPicker/ColorSpectrum.Components.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace Fabulous.Avalonia | ||
|
||
open Avalonia.Controls.Primitives | ||
open Avalonia.Media | ||
open Fabulous | ||
open Fabulous.Avalonia | ||
|
||
module ComponentColorSpectrum = | ||
let ColorChanged = | ||
Attributes.defineAvaloniaPropertyWithChangedEventNoDispatch' "ColorSpectrum_ColorChanged" ColorSpectrum.ColorProperty | ||
|
||
[<AutoOpen>] | ||
module ComponentColorSpectrumBuilders = | ||
type Fabulous.Avalonia.View with | ||
/// <summary>Creates a ColorSpectrum widget.</summary> | ||
/// <param name="color">The Color value.</param> | ||
/// <param name="fn">Raised when the color changes.</param> | ||
static member ColorSpectrum(color: Color, fn: Color -> unit) = | ||
WidgetBuilder<'msg, IFabColorSpectrum>( | ||
ColorSpectrum.WidgetKey, | ||
ComponentColorSpectrum.ColorChanged.WithValue(ComponentValueEventData.create color fn) | ||
) |
19 changes: 19 additions & 0 deletions
19
extensions/Fabulous.Avalonia.ColorPicker/ColorSpectrum.Mvu.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Fabulous.Avalonia | ||
|
||
open Avalonia.Controls.Primitives | ||
open Avalonia.Media | ||
open Fabulous | ||
open Fabulous.Avalonia | ||
|
||
module MvuColorSpectrum = | ||
let ColorChanged = | ||
Attributes.defineAvaloniaPropertyWithChangedEvent' "ColorSpectrum_ColorChanged" ColorSpectrum.ColorProperty | ||
|
||
[<AutoOpen>] | ||
module MvuColorSpectrumBuilders = | ||
type Fabulous.Avalonia.View with | ||
/// <summary>Creates a ColorSpectrum widget.</summary> | ||
/// <param name="color">The Color value.</param> | ||
/// <param name="fn">Raised when the color changes.</param> | ||
static member ColorSpectrum(color: Color, fn: Color -> 'msg) = | ||
WidgetBuilder<'msg, IFabColorSpectrum>(ColorSpectrum.WidgetKey, MvuColorSpectrum.ColorChanged.WithValue(ValueEventData.create color fn)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.