Skip to content

Commit

Permalink
Merge pull request #295 from enisn/4.1-update-migration-guide
Browse files Browse the repository at this point in the history
4.1-update-migration-guide
  • Loading branch information
enisn authored Sep 6, 2022
2 parents 704b9cc + 7a3fdfd commit 5df7b9a
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions docs/en/migration-guides/migrating-to-v4.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,47 @@ InputKit version 4.1 comes a couple of breaking-changes. Please check following

This document applies both to MAUI and Xamarin Forms.


### CheckBox

- Material Type no longer sets the border color to same color as the `Color` property. You should set `BorderColor` property to same color as `Color` property if you want to keep the same look.

```xml
<!-- Old -->
<input:CheckBox Type="Material" Color="{StaticResource Primary}">

<!-- New -->
<input:CheckBox Type="Material" Color="{StaticResource Primary}" BorderColor="{StaticResource Primary}">
```

- Now CheckBox.CheckChanged sends CheckChangedEventArgs class instead of blank EventArgs class.

```csharp
public class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();

checkBox.CheckChanged += CheckBox_CheckChanged;
}

// Old
private void CheckBox_CheckChanged(object sender, EventArgs e)
{
// ...
}

// New
private void CheckBox_CheckChanged(object sender, CheckChangedEventArgs e)
{
Console.WriteLine(e.Value); // Value represents the new value of the checkbox.
// ...
}

}
```

### AdvancedEntry
- `IconColor` is removed from `AdvancedEntry`.
- `IconImage` property type is changed to `ImageSource` from `string`. _(Not FontImageSource can be passed as parameter.)_
Expand Down

0 comments on commit 5df7b9a

Please sign in to comment.