Skip to content

Commit

Permalink
Merge pull request #33 from egvijayanand/working
Browse files Browse the repository at this point in the history
Samples updated to .NET MAUI RC3
  • Loading branch information
egvijayanand authored May 11, 2022
2 parents c0e4a9c + 793eeab commit ad488e9
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 35 deletions.
1 change: 1 addition & 0 deletions src/global.json → global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"sdk": {
"allowPrerelease": true,
"rollForward": "latestMinor",
"version": "6.0.200"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>2.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.CommunityToolkit" Version="2.0.2" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2401" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.2" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.3" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<LangVersion>preview</LangVersion>
<LangVersion>latest</LangVersion>
<RootNamespace>DateCalculator</RootNamespace>
<AssemblyName>DateCalculator</AssemblyName>
</PropertyGroup>
Expand All @@ -28,9 +28,9 @@

<ItemGroup>
<PackageReference Include="VijayAnand.FontAwesome" Version="2.1.1" />
<PackageReference Include="Xamarin.CommunityToolkit" Version="2.0.1" />
<PackageReference Include="Xamarin.CommunityToolkit" Version="2.0.2" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2401" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.2" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Maui.CommunityToolkit.Extensions.Internals;
using Microsoft.Maui.Controls;
using System;
using System.Globalization;

#nullable enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<!-- App Identifier -->
<ApplicationId>com.egvijayanand.maui.datecalculator</ApplicationId>
<ApplicationIdGuid>E4995291-7DD1-45F2-B37C-2CF5FA897267</ApplicationIdGuid>
<ApplicationIdGuid>e4995291-7dd1-45f2-b37c-2cf5fa897267</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
Expand Down Expand Up @@ -54,6 +54,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui" Version="1.0.0-rc3" />
<PackageReference Include="VijayAnand.FontAwesome" Version="2.1.1" />
</ItemGroup>

Expand Down Expand Up @@ -84,7 +85,7 @@
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\SettingsPage.xaml">
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>

Expand Down
5 changes: 4 additions & 1 deletion src/DateCalculator/DateCalculator.Maui/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
using CommunityToolkit.Maui;

[assembly: XamlCompilation(XamlCompilationOptions.Compile)]

namespace DateCalculator
{
Expand All @@ -8,6 +10,7 @@ public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder.UseMauiApp<App>()
.UseMauiCommunityToolkit()
.ConfigureFonts(fonts =>
{
fonts.AddFont("fa-regular-400.ttf", "FAR");
Expand Down
13 changes: 6 additions & 7 deletions src/DateCalculator/DateCalculator.Maui/Views/DatePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
x:Class="DateCalculator.Views.DatePage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:behaviors="clr-namespace:Maui.CommunityToolkit.Behaviors"
xmlns:controls="clr-namespace:DateCalculator.Controls"
xmlns:converters="clr-namespace:Maui.CommunityToolkit.Converters"
xmlns:mct="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
xmlns:pages="clr-namespace:DateCalculator.Views"
xmlns:vm="clr-namespace:DateCalculator.ViewModels;assembly=DateCalculator.Shared"
Title="{Binding Title}"
Expand All @@ -16,9 +15,9 @@
<vm:DateViewModel />
</ContentPage.BindingContext>
<pages:MauiPage.Resources>
<converters:InvertedBoolConverter x:Key="InverseBoolConverter" />
<converters:IntToBoolConverter x:Key="IntToBoolConverter" />
<converters:CheckedChangedEventArgsConverter x:Key="CheckedChangedEventArgsConverter" />
<mct:InvertedBoolConverter x:Key="InverseBoolConverter" />
<!--<mct:IntToBoolConverter x:Key="IntToBoolConverter" />-->
<!--<converters:CheckedChangedEventArgsConverter x:Key="CheckedChangedEventArgsConverter" />-->
</pages:MauiPage.Resources>
<pages:MauiPage.Content>
<Grid Style="{StaticResource ContentArea}">
Expand All @@ -33,15 +32,15 @@
<Label Style="{StaticResource Caption}" Text="From" />
<DatePicker Date="{Binding StartDate}">
<DatePicker.Behaviors>
<behaviors:EventToCommandBehavior Command="{Binding DateDiffCommand}" EventName="DateSelected" />
<mct:EventToCommandBehavior Command="{Binding DateDiffCommand}" EventName="DateSelected" />
</DatePicker.Behaviors>
</DatePicker>
</StackLayout>
<StackLayout IsVisible="{Binding DiffMode}">
<Label Style="{StaticResource Caption}" Text="To" />
<DatePicker Date="{Binding EndDate}">
<DatePicker.Behaviors>
<behaviors:EventToCommandBehavior Command="{Binding DateDiffCommand}" EventName="DateSelected" />
<mct:EventToCommandBehavior Command="{Binding DateDiffCommand}" EventName="DateSelected" />
</DatePicker.Behaviors>
</DatePicker>
</StackLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,10 @@
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>2.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.CommunityToolkit" Version="2.0.2" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2401" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.12" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.2" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DateCalculator.Forms\DateCalculator.Forms.csproj">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,9 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.CommunityToolkit">
<Version>2.0.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.CommunityToolkit" Version="2.0.2" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2401" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.2" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.3" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions src/DateCalculator/DateCalculator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Global
{62B466BB-9349-4249-95E4-739FF15ACA2D}.Release|x86.ActiveCfg = Release|Any CPU
{62B466BB-9349-4249-95E4-739FF15ACA2D}.Release|x86.Build.0 = Release|Any CPU
{5A3A2A5D-3707-4DAF-BE16-61557AC6A169}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A3A2A5D-3707-4DAF-BE16-61557AC6A169}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5A3A2A5D-3707-4DAF-BE16-61557AC6A169}.Debug|ARM.ActiveCfg = Debug|Any CPU
{5A3A2A5D-3707-4DAF-BE16-61557AC6A169}.Debug|ARM.Build.0 = Debug|Any CPU
{5A3A2A5D-3707-4DAF-BE16-61557AC6A169}.Debug|iPhone.ActiveCfg = Debug|Any CPU
Expand All @@ -126,6 +127,8 @@ Global
{5A3A2A5D-3707-4DAF-BE16-61557AC6A169}.Release|x86.ActiveCfg = Release|Any CPU
{5A3A2A5D-3707-4DAF-BE16-61557AC6A169}.Release|x86.Build.0 = Release|Any CPU
{99E69267-7FF2-49A3-A940-AD7B47B70CDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{99E69267-7FF2-49A3-A940-AD7B47B70CDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99E69267-7FF2-49A3-A940-AD7B47B70CDB}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{99E69267-7FF2-49A3-A940-AD7B47B70CDB}.Debug|ARM.ActiveCfg = Debug|Any CPU
{99E69267-7FF2-49A3-A940-AD7B47B70CDB}.Debug|ARM.Build.0 = Debug|Any CPU
{99E69267-7FF2-49A3-A940-AD7B47B70CDB}.Debug|ARM.Deploy.0 = Debug|Any CPU
Expand Down Expand Up @@ -160,10 +163,14 @@ Global
{99E69267-7FF2-49A3-A940-AD7B47B70CDB}.Release|x86.Build.0 = Release|Any CPU
{99E69267-7FF2-49A3-A940-AD7B47B70CDB}.Release|x86.Deploy.0 = Release|Any CPU
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|Any CPU.ActiveCfg = Debug|x86
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|Any CPU.Build.0 = Debug|x86
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|Any CPU.Deploy.0 = Debug|x86
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|ARM.ActiveCfg = Debug|ARM
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|ARM.Build.0 = Debug|ARM
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|ARM.Deploy.0 = Debug|ARM
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|iPhone.ActiveCfg = Debug|x86
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|iPhone.Build.0 = Debug|x86
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|iPhone.Deploy.0 = Debug|x86
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|x64.ActiveCfg = Debug|x64
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Debug|x64.Build.0 = Debug|x64
Expand All @@ -184,9 +191,11 @@ Global
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Release|x86.Build.0 = Release|x86
{714909A8-18B2-4D6C-BC17-E8C36BC97097}.Release|x86.Deploy.0 = Release|x86
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Debug|iPhone.ActiveCfg = Debug|iPhone
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Debug|iPhone.Build.0 = Debug|iPhone
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Debug|iPhone.Deploy.0 = Debug|iPhone
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
Expand All @@ -200,6 +209,7 @@ Global
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Release|x64.ActiveCfg = Release|iPhoneSimulator
{4447AABB-F522-4633-A1B7-F07FFB05D4D7}.Release|x86.ActiveCfg = Release|iPhoneSimulator
{85712D75-C3B5-42B5-A41C-813EF313D1E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85712D75-C3B5-42B5-A41C-813EF313D1E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85712D75-C3B5-42B5-A41C-813EF313D1E7}.Debug|ARM.ActiveCfg = Debug|Any CPU
{85712D75-C3B5-42B5-A41C-813EF313D1E7}.Debug|ARM.Build.0 = Debug|Any CPU
{85712D75-C3B5-42B5-A41C-813EF313D1E7}.Debug|iPhone.ActiveCfg = Debug|Any CPU
Expand Down
8 changes: 4 additions & 4 deletions src/MauiBlazorApp/MauiBlazorApp/MauiBlazorApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="1.0.0-rc2" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.4" />
<PackageReference Include="VijayAnand.MauiBlazor.Markup" Version="1.0.0-pre6" />
<PackageReference Include="VijayAnand.MauiToolkit" Version="1.0.0-pre8" />
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="1.0.0-rc3" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.5" />
<PackageReference Include="VijayAnand.MauiBlazor.Markup" Version="1.0.0-pre7" />
<PackageReference Include="VijayAnand.MauiToolkit" Version="1.0.0-pre11" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/MauiBlazorApp/RazorLib/RazorLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/TestApp/TestApp/AppShell.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="{OnPlatform WinUI=Transparent, Android=Transparent, iOS=White}" />
<Setter Property="BackgroundColor" Value="{OnPlatform iOS=White, Default=Transparent}" />
<Setter TargetName="FlyoutItemLabel" Property="Label.TextColor" Value="{AppThemeBinding Dark={StaticResource TextDark}, Default={StaticResource TextLight}}" />
<Setter Property="VerticalOptions" Value="Center" />
</VisualState.Setters>
Expand Down
2 changes: 1 addition & 1 deletion src/TestApp/TestApp/TestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<ItemGroup>
<PackageReference Include="VijayAnand.FontAwesome" Version="2.1.1" />
<PackageReference Include="VijayAnand.MauiToolkit" Version="1.0.0-pre8" />
<PackageReference Include="VijayAnand.MauiToolkit" Version="1.0.0-pre11" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit ad488e9

Please sign in to comment.