🚧 updated for winui

pull/3/head
Marc CHEVALDONNE 7 months ago
parent 88f51002ba
commit 0c5b7c44c4

@ -19,7 +19,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_OutlineText", "ch02_Desi
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_Toolbar", "ch02_DesigningViews\ex_Toolbar\ex_Toolbar.csproj", "{0D77C4EE-DD5C-4DCB-8FCB-F3548BDD398C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ex_CustomToolbar", "ch02_DesigningViews\ex_CustomToolbar\ex_CustomToolbar.csproj", "{5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ex_CustomToolbar", "ch02_DesigningViews\ex_CustomToolbar\ex_CustomToolbar.csproj", "{5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -58,6 +58,7 @@ Global
{0D77C4EE-DD5C-4DCB-8FCB-F3548BDD398C}.Release|Any CPU.Build.0 = Release|Any CPU
{5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E1D0DEE-CD68-4AAD-9597-9BFF30C8214C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection

@ -20,17 +20,20 @@
VerticalOptions="Center"
HeightRequest="36"
FontSize="Medium"/>
<ImageButton Source="hare.png" Grid.Column="2" MaximumHeightRequest="24">
<ImageButton Source="hare.png" Grid.Column="2" MaximumHeightRequest="24" MinimumHeightRequest="{OnPlatform WinUI=24}"
BackgroundColor="Transparent">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</ImageButton.Behaviors>
</ImageButton>
<ImageButton Source="info_circle.png" Grid.Column="3" MaximumHeightRequest="24">
<ImageButton Source="info_circle.png" Grid.Column="3" MaximumHeightRequest="24" MinimumHeightRequest="{OnPlatform WinUI=24}"
BackgroundColor="Transparent">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</ImageButton.Behaviors>
</ImageButton>
<ImageButton Source="ellipsis_vert.png" Grid.Column="4" MaximumHeightRequest="24" Clicked="EllipsisClicked">
<ImageButton Source="ellipsis_vert.png" Grid.Column="4" MaximumHeightRequest="24" MinimumHeightRequest="{OnPlatform WinUI=24}" Clicked="EllipsisClicked"
BackgroundColor="Transparent">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</ImageButton.Behaviors>
@ -81,22 +84,35 @@
BackgroundColor="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}}"
Padding="4">
<VerticalStackLayout>
<HorizontalStackLayout MaximumHeightRequest="24" Margin="0, 4">
<ImageButton Source="captions_bubble.png" >
<HorizontalStackLayout MaximumHeightRequest="{OnPlatform 24, WinUI=40}" Margin="0, 4">
<ImageButton Source="captions_bubble.png"
MinimumHeightRequest="{OnPlatform WinUI=24}"
MinimumWidthRequest="{OnPlatform WinUI=24}"
HeightRequest="{OnPlatform WinUI=24}"
Margin="{OnPlatform WinUI='0,0,4,0'}"
BackgroundColor="Transparent">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</ImageButton.Behaviors>
</ImageButton>
<Label Text="Menu 1" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
<Label Text="Menu 1" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}"
FontSize="{OnPlatform WinUI=Micro}"/>
</HorizontalStackLayout>
<HorizontalStackLayout MaximumHeightRequest="24" Margin="0, 4">
<ImageButton Source="quote_bubble.png">
<HorizontalStackLayout MaximumHeightRequest="{OnPlatform 24, WinUI=40}" Margin="0, 4" >
<ImageButton Source="quote_bubble.png"
MinimumHeightRequest="{OnPlatform WinUI=24}"
MinimumWidthRequest="{OnPlatform WinUI=24}"
HeightRequest="{OnPlatform WinUI=24}"
Margin="{OnPlatform WinUI='0,0,4,0'}"
BackgroundColor="Transparent" VerticalOptions="Center">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</ImageButton.Behaviors>
</ImageButton>
<Label Text="Menu 2" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
<Label Text="Menu 2" VerticalOptions="Center" VerticalTextAlignment="Center"
FontSize="{OnPlatform WinUI=Micro}"
TextColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
</HorizontalStackLayout>
</VerticalStackLayout>
</Frame>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="456" height="456" viewBox="0 0 456 456" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path d="m 105.50037,281.60863 c -2.70293,0 -5.00091,-0.90042 -6.893127,-2.70209 -1.892214,-1.84778 -2.837901,-4.04181 -2.837901,-6.58209 0,-2.58722 0.945687,-4.80389 2.837901,-6.65167 1.892217,-1.84778 4.190197,-2.77167 6.893127,-2.77167 2.74819,0 5.06798,0.92389 6.96019,2.77167 1.93749,1.84778 2.90581,4.06445 2.90581,6.65167 0,2.54028 -0.96832,4.73431 -2.90581,6.58209 -1.89221,1.80167 -4.212,2.70209 -6.96019,2.70209 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
<path d="M 213.56111,280.08446 H 195.99044 L 149.69953,207.0544 c -1.17121,-1.84778 -2.14037,-3.76515 -2.90581,-5.75126 h -0.40578 c 0.36051,2.12528 0.54076,6.67515 0.54076,13.6496 v 65.13172 h -15.54349 v -99.36009 h 18.71925 l 44.7374,71.29798 c 1.89222,2.95695 3.1087,4.98917 3.64945,6.09751 h 0.26996 c -0.45021,-2.6325 -0.67573,-7.09015 -0.67573,-13.37293 v -64.02256 h 15.47557 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
<path d="m 289.25134,280.08446 h -54.40052 v -99.36009 h 52.23835 v 13.99669 h -36.15411 v 28.13085 h 33.31621 v 13.9271 h -33.31621 v 29.37835 h 38.31628 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
<path d="M 366.56466,194.72106 H 338.7222 v 85.3634 h -16.08423 v -85.3634 h -27.77455 v -13.99669 h 71.70124 z" style="fill:#ffffff;fill-rule:nonzero;stroke-width:0.838376" />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -42,13 +42,18 @@
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<MauiSplashScreen Include="Resources\Images\splash.svg">
<Color>#512BD4</Color>
<BaseSize>128,128</BaseSize>
</MauiSplashScreen>
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />
<MauiImage Update="Resources\Images\splash.svg" BaseSize="208,208" />
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
@ -57,6 +62,14 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<MauiImage Remove="Resources\Images\splash.svg" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Images\splash.svg" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="communitytoolkit.maui" Version="8.0.1" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />

Loading…
Cancel
Save