Skip to content

Commit d81032f

Browse files
authored
Merge pull request #20 from DamienDoumer/Features/16_CountryFlags
Features/16 country flags
2 parents 3aceaf5 + 45bace3 commit d81032f

28 files changed

Lines changed: 936 additions & 0 deletions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31611.283
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CountryData.Sample.MAUI", "CountryData.Sample.MAUI\CountryData.Sample.MAUI.csproj", "{85496674-13D9-4D03-826C-D3DD419A5AD7}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CountryData.Standard", "..\..\src\CountryData.Standard\CountryData.Standard.csproj", "{3A01EE67-5E2A-4722-A9A7-994239AF8F05}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{85496674-13D9-4D03-826C-D3DD419A5AD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{85496674-13D9-4D03-826C-D3DD419A5AD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{85496674-13D9-4D03-826C-D3DD419A5AD7}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
19+
{85496674-13D9-4D03-826C-D3DD419A5AD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
20+
{85496674-13D9-4D03-826C-D3DD419A5AD7}.Release|Any CPU.Build.0 = Release|Any CPU
21+
{85496674-13D9-4D03-826C-D3DD419A5AD7}.Release|Any CPU.Deploy.0 = Release|Any CPU
22+
{3A01EE67-5E2A-4722-A9A7-994239AF8F05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23+
{3A01EE67-5E2A-4722-A9A7-994239AF8F05}.Debug|Any CPU.Build.0 = Debug|Any CPU
24+
{3A01EE67-5E2A-4722-A9A7-994239AF8F05}.Release|Any CPU.ActiveCfg = Release|Any CPU
25+
{3A01EE67-5E2A-4722-A9A7-994239AF8F05}.Release|Any CPU.Build.0 = Release|Any CPU
26+
EndGlobalSection
27+
GlobalSection(SolutionProperties) = preSolution
28+
HideSolutionNode = FALSE
29+
EndGlobalSection
30+
GlobalSection(ExtensibilityGlobals) = postSolution
31+
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
32+
EndGlobalSection
33+
EndGlobal
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version = "1.0" encoding = "UTF-8" ?>
2+
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
xmlns:local="clr-namespace:CountryData.Sample.MAUI"
5+
x:Class="CountryData.Sample.MAUI.App">
6+
<Application.Resources>
7+
<ResourceDictionary Source="Resources/Styles.xaml" />
8+
</Application.Resources>
9+
</Application>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace CountryData.Sample.MAUI;
2+
3+
public partial class App : Application
4+
{
5+
public App()
6+
{
7+
InitializeComponent();
8+
9+
MainPage = new AppShell();
10+
}
11+
}
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="CountryData.Sample.MAUI.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:CountryData.Sample.MAUI"
7+
Shell.FlyoutBehavior="Disabled">
8+
9+
<ShellContent
10+
Title="Here is Country Data"
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 CountryData.Sample.MAUI;
2+
3+
public partial class AppShell : Shell
4+
{
5+
public AppShell()
6+
{
7+
InitializeComponent();
8+
}
9+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net6.0-android;net6.0-ios</TargetFrameworks>
5+
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
6+
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
7+
<OutputType>Exe</OutputType>
8+
<RootNamespace>CountryData.Sample.MAUI</RootNamespace>
9+
<UseMaui>true</UseMaui>
10+
<SingleProject>true</SingleProject>
11+
<ImplicitUsings>enable</ImplicitUsings>
12+
13+
<!-- Display name -->
14+
<ApplicationTitle>CountryData.Sample.MAUI</ApplicationTitle>
15+
16+
<!-- App Identifier -->
17+
<ApplicationId>com.companyname.countrydata.sample.maui</ApplicationId>
18+
<ApplicationIdGuid>58C9DE2C-1916-4071-AF1A-8BB0CE7A384A</ApplicationIdGuid>
19+
20+
<!-- Versions -->
21+
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
22+
<ApplicationVersion>1</ApplicationVersion>
23+
24+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
25+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
26+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
27+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
28+
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
29+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
30+
</PropertyGroup>
31+
32+
<ItemGroup>
33+
<!-- App Icon -->
34+
<MauiIcon Include="Resources\appicon.svg" ForegroundFile="Resources\appiconfg.svg" Color="#512BD4" />
35+
36+
<!-- Splash Screen -->
37+
<MauiSplashScreen Include="Resources\appiconfg.svg" Color="#512BD4" BaseSize="128,128" />
38+
39+
<!-- Images -->
40+
<MauiImage Include="Resources\Images\*" />
41+
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
42+
43+
<!-- Custom Fonts -->
44+
<MauiFont Include="Resources\Fonts\*" />
45+
46+
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
47+
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
48+
</ItemGroup>
49+
50+
<ItemGroup>
51+
<PackageReference Include="ReactiveUI" Version="18.0.10" />
52+
<PackageReference Include="ReactiveUI.Fody" Version="18.0.10" />
53+
</ItemGroup>
54+
55+
<ItemGroup>
56+
<ProjectReference Include="..\..\..\src\CountryData.Standard\CountryData.Standard.csproj" />
57+
</ItemGroup>
58+
59+
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
2+
<ReactiveUI />
3+
</Weavers>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3+
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
4+
<xs:element name="Weavers">
5+
<xs:complexType>
6+
<xs:all>
7+
<xs:element name="ReactiveUI" minOccurs="0" maxOccurs="1" type="xs:anyType" />
8+
</xs:all>
9+
<xs:attribute name="VerifyAssembly" type="xs:boolean">
10+
<xs:annotation>
11+
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
12+
</xs:annotation>
13+
</xs:attribute>
14+
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
15+
<xs:annotation>
16+
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
17+
</xs:annotation>
18+
</xs:attribute>
19+
<xs:attribute name="GenerateXsd" type="xs:boolean">
20+
<xs:annotation>
21+
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
22+
</xs:annotation>
23+
</xs:attribute>
24+
</xs:complexType>
25+
</xs:element>
26+
</xs:schema>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
x:Class="CountryData.Sample.MAUI.MainPage"
5+
xmlns:viewmodels="clr-namespace:CountryData.Sample.MAUI.ViewModels"
6+
x:DataType="{x:Type viewmodels:MainViewModel}"
7+
xmlns:country="clr-namespace:CountryData.Standard;assembly=CountryData.Standard">
8+
9+
<CollectionView ItemsSource="{Binding Countries}">
10+
<CollectionView.ItemTemplate>
11+
<DataTemplate x:DataType="{x:Type country:Country}">
12+
<ContentView>
13+
<Grid ColumnDefinitions="Auto,30,*"
14+
Margin="5"
15+
ColumnSpacing="5">
16+
<Label Text="{Binding CountryFlag}"
17+
FontSize="Large"/>
18+
19+
<Label Grid.Column="1"
20+
Text="{Binding CountryShortCode}"/>
21+
22+
<Label Grid.Column="2"
23+
HorizontalTextAlignment="Start"
24+
HorizontalOptions="FillAndExpand"
25+
Text="{Binding CountryName}"/>
26+
</Grid>
27+
</ContentView>
28+
</DataTemplate>
29+
</CollectionView.ItemTemplate>
30+
</CollectionView>
31+
</ContentPage>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using CountryData.Sample.MAUI.ViewModels;
2+
3+
namespace CountryData.Sample.MAUI;
4+
5+
public partial class MainPage : ContentPage
6+
{
7+
int count = 0;
8+
9+
public MainPage(MainViewModel mainViewModel)
10+
{
11+
InitializeComponent();
12+
BindingContext = mainViewModel;
13+
}
14+
15+
//private void OnCounterClicked(object sender, EventArgs e)
16+
//{
17+
// count++;
18+
// CounterLabel.Text = $"Current count: {count}";
19+
20+
// SemanticScreenReader.Announce(CounterLabel.Text);
21+
//}
22+
}
23+

0 commit comments

Comments
 (0)