-
Notifications
You must be signed in to change notification settings - Fork 0
/
maui_atomic.cs
60 lines (54 loc) · 1.39 KB
/
maui_atomic.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// 1. create maui app with name "tempmaui"
// 2. delete: App.xaml, AppShell.xaml, MainPage.xaml, MauiProgram.cs
// 3. create new class and name it "tempmaui"
// 4. use LLMs (e.g. Copilot) to learn more about .NET MAUI
namespace tempmaui;
public static class MauiProgram
{
public static MauiApp CreateMauiApp() =>
MauiApp.CreateBuilder().UseMauiApp<App>()
.Build();
}
public class App : Application
{
public App()
{
MainPage = new ContentPage
{
Content = new Label
{
Text = "Hello, World!",
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center,
FontSize = 24,
}
};
}
}
/*
public static class MauiProgram
{
public static MauiApp CreateMauiApp() =>
MauiApp.CreateBuilder().UseMauiApp<App>()
.Build();
}
public class App : Application
{
public App() => MainPage = new MainPage();
}
public class MainPage : ContentPage
{
public MainPage()
{
BackgroundColor = Colors.White;
Content = new Label
{
Text = "Hello .NET MAUI",
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center,
FontSize = 24,
TextColor = Colors.Black
};
}
}
*/