-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
75 additions
and
24 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
41 changes: 20 additions & 21 deletions
41
src/Maui.BindableProperty.Generator.Demo/CustomControls/HeaderGenericControl.xaml.cs
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 |
---|---|---|
@@ -1,32 +1,31 @@ | ||
using Maui.BindableProperty.Generator.Core; | ||
|
||
namespace Maui.BindableProperty.Generator.Demo.CustomControls | ||
namespace Maui.BindableProperty.Generator.Demo.CustomControls; | ||
|
||
public partial class HeaderGenericControl<T> : VerticalStackLayout | ||
{ | ||
public partial class HeaderGenericControl<T> : VerticalStackLayout | ||
{ | ||
#pragma warning disable CS0169 | ||
#pragma warning disable CS0169 | ||
|
||
[AutoBindable] | ||
private bool _isGenerated; | ||
[AutoBindable] | ||
private bool _isGenerated; | ||
|
||
[AutoBindable(OnChanged = nameof(UpdateGenericSample))] | ||
private readonly T _genericSample = default!; | ||
[AutoBindable(OnChanged = nameof(UpdateGenericSample))] | ||
private readonly T _genericSample = default!; | ||
|
||
#pragma warning restore CS0169 | ||
#pragma warning restore CS0169 | ||
|
||
public HeaderGenericControl() | ||
{ | ||
this.IsGenerated = false; | ||
} | ||
public HeaderGenericControl() | ||
{ | ||
this.IsGenerated = false; | ||
} | ||
|
||
private void UpdateGenericSample() | ||
{ | ||
// Do stuff here | ||
} | ||
private void UpdateGenericSample() | ||
{ | ||
// Do stuff here | ||
} | ||
|
||
private void UpdateGenericSample(T oldValue, T newValue) | ||
{ | ||
// Do stuff here | ||
} | ||
private void UpdateGenericSample(T oldValue, T newValue) | ||
{ | ||
// Do stuff here | ||
} | ||
} |
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
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