Skip to content

Commit 081b22c

Browse files
authored
Merge pull request #253 from enisn/maui-update-to-6.0.312
Maui update to 6.0.312
2 parents 67f4222 + 575506f commit 081b22c

23 files changed

+616
-157
lines changed

sandbox/SandboxMAUI/App.xaml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
1-
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
1+
<?xml version = "1.0" encoding = "UTF-8" ?>
2+
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
23
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
34
xmlns:local="clr-namespace:SandboxMAUI"
45
x:Class="SandboxMAUI.App">
56
<Application.Resources>
67
<ResourceDictionary>
7-
8-
<Color x:Key="PrimaryColor">#512bdf</Color>
9-
<Color x:Key="SecondaryColor">White</Color>
10-
11-
<Style TargetType="Label">
12-
<Setter Property="TextColor" Value="{DynamicResource PrimaryColor}" />
13-
<Setter Property="FontFamily" Value="OpenSansRegular" />
14-
</Style>
15-
16-
<Style TargetType="Button">
17-
<Setter Property="TextColor" Value="{DynamicResource SecondaryColor}" />
18-
<Setter Property="FontFamily" Value="OpenSansRegular" />
19-
<Setter Property="BackgroundColor" Value="{DynamicResource PrimaryColor}" />
20-
<Setter Property="Padding" Value="14,10" />
21-
</Style>
22-
8+
<ResourceDictionary.MergedDictionaries>
9+
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
10+
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
11+
</ResourceDictionary.MergedDictionaries>
2312
</ResourceDictionary>
2413
</Application.Resources>
2514
</Application>

sandbox/SandboxMAUI/App.xaml.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
public partial class App : Application
44
{
5-
public App()
6-
{
7-
InitializeComponent();
5+
public App()
6+
{
7+
InitializeComponent();
88

9-
MainPage = new NavigationPage(new MainPage());
10-
}
9+
MainPage = new AppShell();
10+
}
1111
}

sandbox/SandboxMAUI/AppShell.xaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<Shell
3+
x:Class="SandboxMAUI.AppShell"
4+
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
5+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
6+
xmlns:local="clr-namespace:SandboxMAUI"
7+
Shell.FlyoutBehavior="Disabled">
8+
9+
<ShellContent
10+
Title="Home"
11+
ContentTemplate="{DataTemplate local:MainPage}"
12+
Route="MainPage" />
13+
14+
</Shell>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace SandboxMAUI;
2+
3+
public partial class AppShell : Shell
4+
{
5+
public AppShell()
6+
{
7+
InitializeComponent();
8+
}
9+
}

sandbox/SandboxMAUI/MainPage.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
23
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
3-
x:Class="SandboxMAUI.MainPage"
4-
xmlns:input="clr-namespace:InputKit.Shared.Controls;assembly=InputKit"
5-
BackgroundColor="{DynamicResource SecondaryColor}">
4+
x:Class="SandboxMAUI.MainPage">
65

76
<ScrollView>
87
<StackLayout
98
Padding="{OnPlatform iOS='30,60,30,30', Default='30'}" Spacing="10">
109

11-
1210
<Button Text="CheckBox" Clicked="GoToCheckBoxPage" />
1311

1412
<Button Text="Radio Button" Clicked="GoToRadioButtonPage" />
1513

1614
<Button Text="Advanced Entry &amp; FormView" Clicked="GoToAdvancedEntryPage" />
15+
1716
<Button Text="Advanced Slider" Clicked="GoToAdvancedSliderPage" />
1817

1918
</StackLayout>
2019
</ScrollView>
20+
2121
</ContentPage>
Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,30 @@
1-
using System;
2-
using Microsoft.Maui.Controls;
3-
using Microsoft.Maui.Essentials;
4-
using SandboxMAUI.Pages;
1+
using SandboxMAUI.Pages;
52

6-
namespace SandboxMAUI
3+
namespace SandboxMAUI;
4+
5+
public partial class MainPage : ContentPage
76
{
8-
public partial class MainPage : ContentPage
7+
public MainPage()
98
{
10-
public MainPage()
11-
{
12-
InitializeComponent();
13-
}
14-
15-
async void GoToCheckBoxPage(System.Object sender, System.EventArgs e)
16-
{
17-
await Navigation.PushAsync(new CheckBoxPage());
18-
}
9+
InitializeComponent();
10+
}
11+
async void GoToCheckBoxPage(System.Object sender, System.EventArgs e)
12+
{
13+
await Navigation.PushAsync(new CheckBoxPage());
14+
}
1915

20-
async void GoToRadioButtonPage(System.Object sender, System.EventArgs e)
21-
{
22-
await Navigation.PushAsync(new RadioButtonPage());
23-
}
16+
async void GoToRadioButtonPage(System.Object sender, System.EventArgs e)
17+
{
18+
await Navigation.PushAsync(new RadioButtonPage());
19+
}
2420

25-
async void GoToAdvancedEntryPage(System.Object sender, System.EventArgs e)
26-
{
27-
await Navigation.PushAsync(new AdvancedEntryPage());
28-
}
21+
async void GoToAdvancedEntryPage(System.Object sender, System.EventArgs e)
22+
{
23+
await Navigation.PushAsync(new AdvancedEntryPage());
24+
}
2925

30-
async void GoToAdvancedSliderPage(System.Object sender, System.EventArgs e)
31-
{
32-
await Navigation.PushAsync(new AdvancedSliderPage());
33-
}
26+
async void GoToAdvancedSliderPage(System.Object sender, System.EventArgs e)
27+
{
28+
await Navigation.PushAsync(new AdvancedSliderPage());
3429
}
35-
}
30+
}

sandbox/SandboxMAUI/MauiProgram.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public static MauiApp CreateMauiApp()
1212
.ConfigureFonts(fonts =>
1313
{
1414
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
15+
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
1516
});
1617

1718
builder.ConfigureMauiHandlers(handlers =>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3-
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
43
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
54
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
5+
<uses-permission android:name="android.permission.INTERNET" />
66
</manifest>

sandbox/SandboxMAUI/Platforms/Android/MainActivity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace SandboxMAUI;
66

7-
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
7+
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
88
public class MainActivity : MauiAppCompatActivity
99
{
1010
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using Microsoft.Maui;
3+
using Microsoft.Maui.Hosting;
4+
5+
namespace SandboxMAUI;
6+
7+
class Program : MauiApplication
8+
{
9+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
10+
11+
static void Main(string[] args)
12+
{
13+
var app = new Program();
14+
app.Run(args);
15+
}
16+
}

0 commit comments

Comments
 (0)