Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinBonilla committed Oct 13, 2023
2 parents dd0b45a + 826da33 commit a0c84c5
Show file tree
Hide file tree
Showing 44 changed files with 580 additions and 420 deletions.
2 changes: 1 addition & 1 deletion MaterialDesignControls.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.8.1">
<id>Plugin.MaterialDesignControls</id>
<version>3.0.1-alpha</version>
<version>3.0.2-alpha</version>
<title>MaterialDesignControls Plugin for Xamarin Forms</title>
<authors>Horus</authors>
<owners>AgustinBonillaHorus</owners>
Expand Down
16 changes: 16 additions & 0 deletions MaterialDialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ This property is to the font family of the cancel button.
This property is to the command of the cancel button.
<br/>

### Property CancelIsBusy:
This property is to show a busy indicator in the cancel button when a command is running.
<br/>

### Property AcceptIsEnabled:
This property is to set if the cancel button is enabled or disabled.
<br/>

### Property AcceptText:
This property is to set the text of the accept button.
<br/>
Expand All @@ -161,6 +169,14 @@ This property is to the font family of the accept button.
This property is to the command of the accept button.
<br/>

### Property AcceptIsBusy:
This property is to show a busy indicator in the accept button when a command is running.
<br/>

### Property AcceptIsEnabled:
This property is to set if the accept button is enabled or disabled.
<br/>

### Property ButtonsAlignment:
This property is to set the horizontal alignment of the accept and cancel buttons.
#### Allowed Values:
Expand Down
7 changes: 7 additions & 0 deletions MaterialIconButton.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,10 @@ This property is to set a custom icon when the icon button is disabled.

### PaddingIcon:
This property is used to define the padding of the icon in relation to the circle.<br/>

### Property BusyColor:
This property is to set the color of the busy indicator.

### Property IsBusy:
This property is to show a busy indicator in the button when a command is running.
<br/>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
HeadlineText="Basic dialog"
SupportingText="Basic dialog with an accept button and cancel button."
AcceptText="Accept"
AcceptCommand="{Binding AcceptCommand}"
AcceptCommand="{Binding AcceptTaskCommand}"
AcceptIsBusy="{Binding AcceptTaskCommand.IsRunning}"
CancelText="Cancel"
CancelCommand="{Binding CancelCommand}" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@

<material3:MaterialLabel FontFamily="{StaticResource SemiBoldFont}"
HorizontalTextAlignment="Center"
Text="Standard Type" />
<material3:MaterialIconButton Command="{Binding StandardCommand}">
Text="Standard Type with IsBusy" />
<material3:MaterialIconButton
Command="{Binding StandardCommand}"
IsBusy="{Binding StandardCommand.IsRunning}">
<material3:MaterialIconButton.CustomIcon>
<ffimageloadingsvg:SvgCachedImage Source="resource://ExampleMaterialDesignControls.Resources.Svg.mute.svg" />
</material3:MaterialIconButton.CustomIcon>
Expand Down Expand Up @@ -60,8 +62,11 @@

<material3:MaterialLabel FontFamily="{StaticResource SemiBoldFont}"
HorizontalTextAlignment="Center"
Text="Tonal Type" />
<material3:MaterialIconButton ButtonType="Tonal" Command="{Binding TonalCommand}">
Text="Tonal Type with IsBusy" />
<material3:MaterialIconButton
ButtonType="Tonal"
Command="{Binding TonalCommand}"
IsBusy="{Binding TonalCommand.IsRunning}">
<material3:MaterialIconButton.CustomIcon>
<ffimageloadingsvg:SvgCachedImage Source="resource://ExampleMaterialDesignControls.Resources.Svg.mute.svg" />
</material3:MaterialIconButton.CustomIcon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ private async Task Accept()
await this.DisplayAlert(_controlTitle, "Accept button was tapped", "Ok");
}

[ICommand]
private async Task AcceptTask()
{
await Task.Delay(1000);
await this.DisplayAlert(_controlTitle, "Accept button was tapped", "Ok");
}

[ICommand]
private async Task Cancel()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public MaterialIconButtonViewModel()
[ICommand]
private async Task Standard()
{
await Task.Delay(1500);
await this.DisplayAlert(_controlTitle, $"Standard button command executed", "Ok");
}

Expand All @@ -37,6 +38,7 @@ private async Task Outlined()
[ICommand]
private async Task Tonal()
{
await Task.Delay(1500);
await this.DisplayAlert(_controlTitle, $"Filled button command executed", "Ok");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public ICustomAnimation CustomAnimation
}

public static readonly BindableProperty ColorProperty =
BindableProperty.Create(nameof(Color), typeof(Color), typeof(BaseMaterialCheckboxes), defaultValue: DefaultStyles.PrimaryColor);
BindableProperty.Create(nameof(Color), typeof(Color), typeof(BaseMaterialCheckboxes), defaultValue: MaterialColor.Primary);

public Color Color
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public ICustomAnimation CustomAnimation
}

public static new readonly BindableProperty BackgroundColorProperty =
BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(MaterialFloatingButton), defaultValue: DefaultStyles.PrimaryColor);
BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(MaterialFloatingButton), defaultValue: MaterialColor.Primary);


public new Color BackgroundColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class MaterialLabel : Label
}

public static new readonly BindableProperty TextColorProperty =
BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(MaterialLabel), defaultValue: DefaultStyles.TextColor);
BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(MaterialLabel), defaultValue: MaterialColor.Text);

public new Color TextColor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public Color DisabledBackgroundColor
}

public static readonly BindableProperty SelectedColorProperty =
BindableProperty.Create(nameof(SelectedColor), typeof(Color), typeof(MaterialSegmented), defaultValue: DefaultStyles.PrimaryColor);
BindableProperty.Create(nameof(SelectedColor), typeof(Color), typeof(MaterialSegmented), defaultValue: MaterialColor.Primary);

public Color SelectedColor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public bool AnimateError
}

public static readonly BindableProperty OnColorProperty =
BindableProperty.Create(nameof(OnColor), typeof(Color), typeof(MaterialSwitch), defaultValue: DefaultStyles.PrimaryColor);
BindableProperty.Create(nameof(OnColor), typeof(Color), typeof(MaterialSwitch), defaultValue: MaterialColor.Primary);

public Color OnColor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public string Text
}

public static readonly BindableProperty TextColorProperty =
BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.TextColor);
BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialColor.Text);

public Color TextColor
{
Expand All @@ -28,7 +28,7 @@ public Color TextColor
}

public static readonly BindableProperty DisabledTextColorProperty =
BindableProperty.Create(nameof(DisabledTextColor), typeof(Color), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.DisableColor);
BindableProperty.Create(nameof(DisabledTextColor), typeof(Color), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialColor.Disable);

public Color DisabledTextColor
{
Expand All @@ -37,7 +37,7 @@ public Color DisabledTextColor
}

public static readonly BindableProperty FontSizeProperty =
BindableProperty.Create(nameof(FontSize), typeof(double), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.FontSizes.BodyLarge);
BindableProperty.Create(nameof(FontSize), typeof(double), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialFontSize.BodyLarge);

public double FontSize
{
Expand All @@ -46,7 +46,7 @@ public double FontSize
}

public static readonly BindableProperty FontFamilyProperty =
BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.FontFamily);
BindableProperty.Create(nameof(FontFamily), typeof(string), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialFontFamily.Default);

public string FontFamily
{
Expand All @@ -68,7 +68,7 @@ public string SupportingText
}

public static readonly BindableProperty SupportingTextColorProperty =
BindableProperty.Create(nameof(SupportingTextColor), typeof(Color), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.ErrorColor);
BindableProperty.Create(nameof(SupportingTextColor), typeof(Color), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialColor.Error);

public Color SupportingTextColor
{
Expand All @@ -77,7 +77,7 @@ public Color SupportingTextColor
}

public static readonly BindableProperty SupportingSizeProperty =
BindableProperty.Create(nameof(SupportingSize), typeof(double), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.FontSizes.BodySmall);
BindableProperty.Create(nameof(SupportingSize), typeof(double), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialFontSize.BodySmall);

public double SupportingSize
{
Expand All @@ -86,7 +86,7 @@ public double SupportingSize
}

public static readonly BindableProperty SupportingFontFamilyProperty =
BindableProperty.Create(nameof(SupportingFontFamily), typeof(string), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.FontFamily);
BindableProperty.Create(nameof(SupportingFontFamily), typeof(string), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialFontFamily.Default);

public string SupportingFontFamily
{
Expand All @@ -104,7 +104,7 @@ public Thickness SupportingMargin
}

public static readonly BindableProperty AnimateErrorProperty =
BindableProperty.Create(nameof(AnimateError), typeof(bool), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.AnimateError);
BindableProperty.Create(nameof(AnimateError), typeof(bool), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialAnimation.AnimateOnError);

public bool AnimateError
{
Expand Down Expand Up @@ -263,7 +263,7 @@ public bool IsChecked
}

public static readonly BindableProperty AnimationProperty =
BindableProperty.Create(nameof(Animation), typeof(AnimationTypes), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.AnimationType);
BindableProperty.Create(nameof(Animation), typeof(AnimationTypes), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialAnimation.Type);

public AnimationTypes Animation
{
Expand All @@ -272,7 +272,7 @@ public AnimationTypes Animation
}

public static readonly BindableProperty AnimationParameterProperty =
BindableProperty.Create(nameof(AnimationParameter), typeof(double?), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.AnimationParameter);
BindableProperty.Create(nameof(AnimationParameter), typeof(double?), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialAnimation.Parameter);

public double? AnimationParameter
{
Expand All @@ -290,7 +290,7 @@ public ICustomAnimation CustomAnimation
}

public static readonly BindableProperty ColorProperty =
BindableProperty.Create(nameof(Color), typeof(Color), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.PrimaryColor);
BindableProperty.Create(nameof(Color), typeof(Color), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialColor.Primary);

public Color Color
{
Expand All @@ -299,7 +299,7 @@ public Color Color
}

public static readonly BindableProperty DisabledColorProperty =
BindableProperty.Create(nameof(DisabledColor), typeof(Color), typeof(BaseMaterialCheckBoxes), defaultValue: DefaultStyles.DisableColor);
BindableProperty.Create(nameof(DisabledColor), typeof(Color), typeof(BaseMaterialCheckBoxes), defaultValue: MaterialColor.Disable);

public Color DisabledColor
{
Expand Down
Loading

0 comments on commit a0c84c5

Please sign in to comment.