-
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
9 changed files
with
74 additions
and
15 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/Maui.BindableProperty.Generator.Demo/CustomControls/HeaderGenericControl.xaml
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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<VerticalStackLayout xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.BindableProperty.Generator.Demo.CustomControls.HeaderGenericControl" | ||
x:Name="this"> | ||
|
||
<VerticalStackLayout.Resources> | ||
|
||
<Style TargetType="{x:Type Label}"> | ||
<Setter Property="Margin" Value="0,10,0,0" /> | ||
</Style> | ||
|
||
</VerticalStackLayout.Resources> | ||
|
||
</VerticalStackLayout> |
32 changes: 32 additions & 0 deletions
32
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Maui.BindableProperty.Generator.Core; | ||
|
||
namespace Maui.BindableProperty.Generator.Demo.CustomControls | ||
{ | ||
public partial class HeaderGenericControl<T> : VerticalStackLayout | ||
{ | ||
#pragma warning disable CS0169 | ||
|
||
[AutoBindable] | ||
private bool _isGenerated; | ||
|
||
[AutoBindable(OnChanged = nameof(UpdateGenericSample))] | ||
private readonly T _genericSample = default!; | ||
|
||
#pragma warning restore CS0169 | ||
|
||
public HeaderGenericControl() | ||
{ | ||
this.IsGenerated = false; | ||
} | ||
|
||
private void UpdateGenericSample() | ||
{ | ||
// 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
2 changes: 1 addition & 1 deletion
2
src/Maui.BindableProperty.Generator.Demo/Platforms/Android/AndroidManifest.xml
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,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" /> | ||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" /> | ||
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
</manifest> |
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
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
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