-
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.
Updated demo project to MAUI RC 6.0.300-rc.1.5355
- Loading branch information
Showing
39 changed files
with
1,088 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version = "1.0" encoding = "UTF-8" ?> | ||
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:local="clr-namespace:Maui.BindableProperty.Generator.Demo" | ||
x:Class="Maui.BindableProperty.Generator.Demo.App"> | ||
<Application.Resources> | ||
<ResourceDictionary Source="Resources/Styles.xaml" /> | ||
</Application.Resources> | ||
</Application> |
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,12 @@ | ||
namespace Maui.BindableProperty.Generator.Demo | ||
{ | ||
public partial class App : Application | ||
{ | ||
public App() | ||
{ | ||
InitializeComponent(); | ||
|
||
MainPage = new AppShell(); | ||
} | ||
} | ||
} |
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,14 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<Shell | ||
x:Class="Maui.BindableProperty.Generator.Demo.AppShell" | ||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:local="clr-namespace:Maui.BindableProperty.Generator.Demo" | ||
Shell.FlyoutBehavior="Disabled"> | ||
|
||
<ShellContent | ||
Title="Hello, World!" | ||
ContentTemplate="{DataTemplate local:MainPage}" | ||
Route="MainPage" /> | ||
|
||
</Shell> |
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,10 @@ | ||
namespace Maui.BindableProperty.Generator.Demo | ||
{ | ||
public partial class AppShell : Shell | ||
{ | ||
public AppShell() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
19 changes: 0 additions & 19 deletions
19
src/Maui.BindableProperty.Generator.Demo/Controls/CustomEntry.cs
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
src/Maui.BindableProperty.Generator.Demo/CustomControls/HeaderControl.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,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.BindableProperty.Generator.Demo.CustomControls.HeaderControl" | ||
x:Name="this"> | ||
<VerticalStackLayout Spacing="25" Padding="30"> | ||
|
||
<Label | ||
BindingContext="{x:Reference this}" | ||
Text="{Binding H1LabelText}" | ||
SemanticProperties.HeadingLevel="Level1" | ||
FontSize="32" | ||
HorizontalOptions="Center" /> | ||
|
||
<Label | ||
BindingContext="{x:Reference this}" | ||
Text="{Binding H2LabelText}" | ||
SemanticProperties.HeadingLevel="Level1" | ||
SemanticProperties.Description="Welcome to dot net Multi platform App U I" | ||
FontSize="18" | ||
HorizontalOptions="Center" /> | ||
|
||
<Label | ||
BindingContext="{x:Reference this}" | ||
Text="{Binding H3LabelText}" | ||
FontSize="18" | ||
FontAttributes="Bold" | ||
x:Name="CounterLabel" | ||
HorizontalOptions="Center" /> | ||
</VerticalStackLayout> | ||
</ContentView> |
27 changes: 27 additions & 0 deletions
27
src/Maui.BindableProperty.Generator.Demo/CustomControls/HeaderControl.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,27 @@ | ||
using Maui.BindableProperty.Generator.Core; | ||
|
||
|
||
namespace Maui.BindableProperty.Generator.Demo.CustomControls | ||
{ | ||
public partial class HeaderControl : ContentView | ||
{ | ||
[AutoBindable] | ||
public string _H1LabelText; | ||
|
||
[AutoBindable] | ||
public string _H2LabelText; | ||
|
||
[AutoBindable(OnChanged = nameof(OnH3LabelTextChanged))] | ||
public string _H3LabelText; | ||
|
||
public HeaderControl() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void OnH3LabelTextChanged(string 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.BindableProperty.Generator.Demo.MainPage" | ||
xmlns:controls="clr-namespace:Maui.BindableProperty.Generator.Demo.CustomControls"> | ||
|
||
<ScrollView> | ||
<VerticalStackLayout Spacing="25" Padding="30"> | ||
|
||
<controls:HeaderControl | ||
H1LabelText = "Hello, World!" | ||
H2LabelText = "Welcome to .NET Multi-platform App UI" | ||
H3LabelText = "{Binding CountText}"/> | ||
|
||
<!--<Label | ||
Text="Hello, World!" | ||
SemanticProperties.HeadingLevel="Level1" | ||
FontSize="32" | ||
HorizontalOptions="Center" /> | ||
<Label | ||
Text="Welcome to .NET Multi-platform App UI" | ||
SemanticProperties.HeadingLevel="Level1" | ||
SemanticProperties.Description="Welcome to dot net Multi platform App U I" | ||
FontSize="18" | ||
HorizontalOptions="Center" /> | ||
<Label | ||
Text="Count: 0" | ||
FontSize="18" | ||
FontAttributes="Bold" | ||
x:Name="CounterLabel" | ||
HorizontalOptions="Center" />--> | ||
|
||
<Button | ||
Text="Click me" | ||
FontAttributes="Bold" | ||
SemanticProperties.Hint="Counts the number of times you click" | ||
Command="{Binding CounterClickedCommand}" | ||
HorizontalOptions="Center" /> | ||
|
||
<Image | ||
Source="dotnet_bot.png" | ||
SemanticProperties.Description="Cute dot net bot waving hi to you!" | ||
WidthRequest="250" | ||
HeightRequest="310" | ||
HorizontalOptions="Center" /> | ||
|
||
</VerticalStackLayout> | ||
</ScrollView> | ||
</ContentPage> |
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,14 @@ | ||
using Maui.BindableProperty.Generator.Demo.ViewModels; | ||
|
||
namespace Maui.BindableProperty.Generator.Demo | ||
{ | ||
public partial class MainPage : ContentPage | ||
{ | ||
public MainPage(MainViewModel viewModel) | ||
{ | ||
InitializeComponent(); | ||
this.BindingContext = viewModel; | ||
} | ||
|
||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using CommunityToolkit.Maui; | ||
using Maui.BindableProperty.Generator.Demo.ViewModels; | ||
|
||
namespace Maui.BindableProperty.Generator.Demo | ||
{ | ||
public static class MauiProgram | ||
{ | ||
public static MauiApp CreateMauiApp() | ||
{ | ||
var builder = MauiApp.CreateBuilder(); | ||
builder | ||
.UseMauiApp<App>() | ||
.UseMauiCommunityToolkit() | ||
.ConfigureFonts(fonts => | ||
{ | ||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); | ||
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); | ||
}); | ||
|
||
builder.Services.AddSingleton<MainPage>(); | ||
builder.Services.AddSingleton<MainViewModel>(); | ||
return builder.Build(); | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
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 |
---|---|---|
@@ -0,0 +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" /> | ||
<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> |
11 changes: 11 additions & 0 deletions
11
src/Maui.BindableProperty.Generator.Demo/Platforms/Android/MainActivity.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,11 @@ | ||
using Android.App; | ||
using Android.Content.PM; | ||
using Android.OS; | ||
|
||
namespace Maui.BindableProperty.Generator.Demo | ||
{ | ||
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] | ||
public class MainActivity : MauiAppCompatActivity | ||
{ | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/Maui.BindableProperty.Generator.Demo/Platforms/Android/MainApplication.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,16 @@ | ||
using Android.App; | ||
using Android.Runtime; | ||
|
||
namespace Maui.BindableProperty.Generator.Demo | ||
{ | ||
[Application] | ||
public class MainApplication : MauiApplication | ||
{ | ||
public MainApplication(IntPtr handle, JniHandleOwnership ownership) | ||
: base(handle, ownership) | ||
{ | ||
} | ||
|
||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); | ||
} | ||
} |
7 changes: 0 additions & 7 deletions
7
src/Maui.BindableProperty.Generator.Demo/Platforms/Android/PlatformClass1.cs
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
src/Maui.BindableProperty.Generator.Demo/Platforms/Android/Resources/values/colors.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="colorPrimary">#512BD4</color> | ||
<color name="colorPrimaryDark">#2B0B98</color> | ||
<color name="colorAccent">#2B0B98</color> | ||
</resources> |
10 changes: 10 additions & 0 deletions
10
src/Maui.BindableProperty.Generator.Demo/Platforms/MacCatalyst/AppDelegate.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,10 @@ | ||
using Foundation; | ||
|
||
namespace Maui.BindableProperty.Generator.Demo | ||
{ | ||
[Register("AppDelegate")] | ||
public class AppDelegate : MauiUIApplicationDelegate | ||
{ | ||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Maui.BindableProperty.Generator.Demo/Platforms/MacCatalyst/Info.plist
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,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>UIDeviceFamily</key> | ||
<array> | ||
<integer>1</integer> | ||
<integer>2</integer> | ||
</array> | ||
<key>UIRequiredDeviceCapabilities</key> | ||
<array> | ||
<string>arm64</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>UISupportedInterfaceOrientations~ipad</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
<key>XSAppIconAssets</key> | ||
<string>Assets.xcassets/appicon.appiconset</string> | ||
</dict> | ||
</plist> |
Oops, something went wrong.