Skip to content

Commit

Permalink
Add L28
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianZug committed Jul 8, 2024
1 parent d18c1d3 commit f23158f
Show file tree
Hide file tree
Showing 40 changed files with 1,435 additions and 52 deletions.
1,372 changes: 1,372 additions & 0 deletions 28_MAUI_II.md

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiDemo.MainPage">

<ScrollView>
<ScrollView>
<VerticalStackLayout
Padding="30,0"
Padding="20,0"
Spacing="25">
<Image
Source="dotnet_bot.png"
Expand All @@ -14,7 +14,7 @@
SemanticProperties.Description="dot net bot in a race car number eight" />

<Label
Text="Hello, Freiberg!"
Text="Hello, World!"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1" />

Expand All @@ -31,6 +31,31 @@
Clicked="OnCounterClicked"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</ScrollView>
</ScrollView>

<!--
<AbsoluteLayout>
<Image
Source="dotnet_bot.png"
HeightRequest="185"
Aspect="AspectFit"
SemanticProperties.Description="dot net bot in a race car number eight"
AbsoluteLayout.LayoutBounds="0, 500, 200, 5"/>
<Label
Text="Hello, World!"
Style="{StaticResource Headline}"
SemanticProperties.HeadingLevel="Level1"/>
<Label
Text="Welcome to &#10;.NET Multi-platform App UI"
Style="{StaticResource SubHeadline}"
SemanticProperties.HeadingLevel="Level2"
SemanticProperties.Description="Welcome to dot net Multi platform App U I"/>
<Button
x:Name="CounterBtn"
Text="Click me"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"/>
</AbsoluteLayout>-->
</ContentPage>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<PropertyGroup>
<TargetFrameworks>net8.0-android</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('linux'))"> net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks><!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('linux'))"> net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
Expand Down
17 changes: 10 additions & 7 deletions code/27_MAUI/MauiDemo/MauiDemo.sln
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MauiDemo", "MauiDemo\MauiDemo.csproj", "{1C68EF73-F20C-4BD9-9245-D7E3B659B3BD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MauiDemo", "MauiDemo.csproj", "{B63CB28E-94D5-488C-8656-B716DB9D596E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B63CB28E-94D5-488C-8656-B716DB9D596E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B63CB28E-94D5-488C-8656-B716DB9D596E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B63CB28E-94D5-488C-8656-B716DB9D596E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B63CB28E-94D5-488C-8656-B716DB9D596E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1C68EF73-F20C-4BD9-9245-D7E3B659B3BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C68EF73-F20C-4BD9-9245-D7E3B659B3BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C68EF73-F20C-4BD9-9245-D7E3B659B3BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C68EF73-F20C-4BD9-9245-D7E3B659B3BD}.Release|Any CPU.Build.0 = Release|Any CPU
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7EC50CA1-9474-4960-8DCF-4E60D371DC87}
EndGlobalSection
EndGlobal
25 changes: 0 additions & 25 deletions code/27_MAUI/MauiDemo/MauiDemo/MauiDemo.sln

This file was deleted.

10 changes: 0 additions & 10 deletions code/27_MAUI/MauiDemo/MauiDemo/Platforms/Android/MainActivity.cs

This file was deleted.

File renamed without changes.
10 changes: 10 additions & 0 deletions code/27_MAUI/MauiDemo/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Android.App;
using Android.Content.PM;
using Android.OS;

namespace MauiDemo;

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="8" xmlns="http://tizen.org/ns/packages">
<profile name="common" />
<ui-application appid="maui-application-id-placeholder" exec="MauiDemo.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>maui-application-title-placeholder</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />

<mp:PhoneIdentity PhoneProductId="9C25F868-6FC7-498D-B099-6A2E37AC1092" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<mp:PhoneIdentity PhoneProductId="475155F9-7618-4E40-9908-1DF68C1D2F05" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
<DisplayName>$placeholder$</DisplayName>
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ is automatically handled by the following `MauiAsset` Build Action within your `

<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />

These files will be deployed with you package and will be accessible using Essentials:
These files will be deployed with your package and will be accessible using Essentials:

async Task LoadMauiAsset()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@

<Style TargetType="Label" x:Key="Headline">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource MidnightBlue}, Dark={StaticResource White}}" />
<Setter Property="FontSize" Value="42" />
<Setter Property="FontSize" Value="32" />
<Setter Property="HorizontalOptions" Value="Center" />
<Setter Property="HorizontalTextAlignment" Value="Center" />
</Style>
Expand Down Expand Up @@ -399,7 +399,7 @@

<Style TargetType="Shell" ApplyToDerivedTypes="True">
<Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource OffBlack}}" />
<Setter Property="Shell.ForegroundColor" Value="{OnPlatform WinUI={StaticResource Primary}, Default={StaticResource White}}" />
<Setter Property="Shell.ForegroundColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource SecondaryDarkText}}" />
<Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource SecondaryDarkText}}" />
<Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="Shell.UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />
Expand Down
7 changes: 7 additions & 0 deletions code/27_MAUI/MauiMinimal/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ public App()
{
HorizontalTextAlignment = TextAlignment.Center,
Text = "Welcome to our new lecture on .NET MAUI!"
},
new Button
{
Text = "Click me!",
Command = new Command(() => {
MainPage.DisplayAlert("Alert", "You clicked the button!", "OK");
})
}
}
}
Expand Down

0 comments on commit f23158f

Please sign in to comment.