Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/AlohaKit/Controls/LinearGauge/LinearGauge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public LinearGauge()
public LinearGaugeDrawable LinearGaugeDrawable { get; set; }

public static readonly new BindableProperty BackgroundProperty =
BindableProperty.Create(nameof(Background), typeof(Brush), typeof(Button), null,
BindableProperty.Create(nameof(Background), typeof(Brush), typeof(Button), new SolidColorBrush(Colors.Pink),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you create a static class where define the Controls Themes with colors etc?

propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is LinearGauge linearGauge)
Expand Down
6 changes: 4 additions & 2 deletions src/AlohaKit/Controls/NumericUpDown/NumericUpDown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public Color Color
}

public static readonly BindableProperty MinimumColorProperty =
BindableProperty.Create(nameof(MinimumColor), typeof(Brush), typeof(NumericUpDown), null,
BindableProperty.Create(nameof(MinimumColor), typeof(Brush), typeof(NumericUpDown), new SolidColorBrush(Colors.Green),
propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is NumericUpDown numericUpDown)
Expand All @@ -69,7 +69,7 @@ public Brush MinimumColor
}

public static readonly BindableProperty MaximumColorProperty =
BindableProperty.Create(nameof(MaximumColor), typeof(Brush), typeof(NumericUpDown), null,
BindableProperty.Create(nameof(MaximumColor), typeof(Brush), typeof(NumericUpDown), new SolidColorBrush(Colors.Red),
propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is NumericUpDown numericUpDown)
Expand Down Expand Up @@ -235,6 +235,8 @@ protected override void OnParentSet()
UpdateMinimum();
UpdateMaximum();
UpdateValue();
UpdateMinimumColor();
UpdateMaximumColor();
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/AlohaKit/Controls/SegmentedControl/SegmentedControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public SegmentedControl()
public SegmentedControlDrawable SegmentedControlDrawable { get; set; }

public static readonly new BindableProperty BackgroundProperty =
BindableProperty.Create(nameof(Background), typeof(Brush), typeof(SegmentedControl), null,
BindableProperty.Create(nameof(Background), typeof(Brush), typeof(SegmentedControl), new SolidColorBrush(Colors.Gray),
propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is SegmentedControl segmentedControl)
Expand All @@ -38,7 +38,7 @@ public SegmentedControl()
}

public static readonly BindableProperty ActiveBackgroundProperty =
BindableProperty.Create(nameof(ActiveBackground), typeof(Brush), typeof(SegmentedControl), null,
BindableProperty.Create(nameof(ActiveBackground), typeof(Brush), typeof(SegmentedControl), new SolidColorBrush(Colors.Pink),
propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is SegmentedControl segmentedControl)
Expand Down
6 changes: 3 additions & 3 deletions src/AlohaKit/Controls/Slider/Slider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public double Value
}

public static readonly BindableProperty MinimumBrushProperty =
BindableProperty.Create(nameof(MinimumBrush), typeof(Brush), typeof(Slider), null,
BindableProperty.Create(nameof(MinimumBrush), typeof(Brush), typeof(Slider), new SolidColorBrush(Colors.Gray),
propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is Slider slider)
Expand All @@ -101,7 +101,7 @@ public Brush MinimumBrush
}

public static readonly BindableProperty MaximumBrushProperty =
BindableProperty.Create(nameof(MaximumBrush), typeof(Brush), typeof(Slider), null,
BindableProperty.Create(nameof(MaximumBrush), typeof(Brush), typeof(Slider), new SolidColorBrush(Colors.Black),
propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is Slider slider)
Expand All @@ -117,7 +117,7 @@ public Brush MaximumBrush
}

public static readonly BindableProperty ThumbBrushProperty =
BindableProperty.Create(nameof(ThumbBrush), typeof(Brush), typeof(Slider), null,
BindableProperty.Create(nameof(ThumbBrush), typeof(Brush), typeof(Slider), new SolidColorBrush(Colors.Pink),
propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is Slider slider)
Expand Down
4 changes: 2 additions & 2 deletions src/AlohaKit/Controls/ToggleSwitch/ToggleSwitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public ToggleSwitch()
public ToggleSwitchDrawable ToggleSwitchDrawable { get; set; }

public static readonly new BindableProperty BackgroundProperty =
BindableProperty.Create(nameof(Background), typeof(Brush), typeof(ToggleSwitch), null,
BindableProperty.Create(nameof(Background), typeof(Brush), typeof(ToggleSwitch), new SolidColorBrush(Colors.Gray),
propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is ToggleSwitch toggleSwitch)
Expand All @@ -42,7 +42,7 @@ public ToggleSwitch()
}

public static readonly BindableProperty ThumbBrushProperty =
BindableProperty.Create(nameof(ThumbBrush), typeof(Brush), typeof(ToggleSwitch), null,
BindableProperty.Create(nameof(ThumbBrush), typeof(Brush), typeof(ToggleSwitch), new SolidColorBrush(Colors.Pink),
propertyChanged: (bindableObject, oldValue, newValue) =>
{
if (newValue != null && bindableObject is ToggleSwitch toggleSwitch)
Expand Down