Merge pull request #138 from unoplatform/dev/agzi/FixFontFamily

fix: Correctly use FontFamily resources
This commit is contained in:
Agnès ZITTE 2021-11-24 16:23:58 -05:00 коммит произвёл GitHub
Родитель 6087f454e3 effdd07f52
Коммит 0ccb8d8929
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
42 изменённых файлов: 448 добавлений и 331 удалений

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -66,10 +66,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Uno.Cupertino">
<Version>1.1.0-dev.31</Version>
<Version>1.1.0-dev.43</Version>
</PackageReference>
<PackageReference Include="Uno.Material">
<Version>1.1.0-dev.31</Version>
<Version>1.1.0-dev.43</Version>
</PackageReference>
<PackageReference Include="Uno.UI" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.UI.RemoteControl" Version="4.0.0-dev.5612" Condition="'$(Configuration)'=='Debug'" />
@ -82,10 +82,10 @@
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData">
<Version>2.3.1.1</Version>
</PackageReference>
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.Core.Extensions.Compatibility" Version="4.0.0-dev.7" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.0-dev.7" />
</ItemGroup>
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.Core.Extensions.Compatibility" Version="4.0.0-dev.7" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.0-dev.7" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@ -93,8 +93,10 @@
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Assets\Fonts\uno-fluentui-assets.ttf" />
<AndroidAsset Include="Assets\Fonts\Material\RobotoMono-VariableFont_wght.ttf" />
<AndroidAsset Include="Assets\Fonts\Cupertino\SF-Pro.ttf" />
<AndroidAsset Include="Assets\Fonts\Material\Roboto-Light.ttf" />
<AndroidAsset Include="Assets\Fonts\Material\Roboto-Medium.ttf" />
<AndroidAsset Include="Assets\Fonts\Material\Roboto-Regular.ttf" />
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
@ -124,6 +126,7 @@
<Name>Uno.Toolkit.UI</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="..\Uno.Toolkit.Samples.Shared\Uno.Toolkit.Samples.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- This will force the generation of the APK when not building inside visual studio -->
@ -134,4 +137,4 @@
<Compile Remove="$(_AndroidResourceDesignerFile)" />
</ItemGroup>
</Target>
</Project>
</Project>

Просмотреть файл

@ -9,13 +9,15 @@
<ResourceDictionary.MergedDictionaries>
<!-- Load WinUI resources -->
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Load Uno.UI.Toolkit resources -->
<ToolkitResources xmlns="using:Uno.Toolkit.UI" />
<!-- Load Material resources -->
<MaterialColors xmlns="using:Uno.Material"
OverrideSource="ms-appx:///ColorPaletteOverride.xaml" />
<MaterialFonts xmlns="using:Uno.Material"
OverrideSource="ms-appx:///MaterialFontsOverride.xaml" />
<MaterialResources xmlns="using:Uno.Material" />
<!-- Load Material Toolkit resources -->
@ -25,13 +27,17 @@
<!-- Load Cupertino resources -->
<CupertinoColors xmlns="using:Uno.Cupertino" />
<CupertinoFonts xmlns="using:Uno.Cupertino"
OverrideSource="ms-appx:///CupertinoFontsOverride.xaml" />
<CupertinoResources xmlns="using:Uno.Cupertino" />
<!-- Load Cupertino Toolkit resources -->
<CupertinoToolkitResources xmlns="using:Uno.Toolkit.UI.Cupertino" />
<!-- Converters -->
<ResourceDictionary Source="Converters.xaml" />
<ResourceDictionary Source="Converters.xaml" />
<!-- Application's custom styles -->
<!-- Application's custom styles -->
<ResourceDictionary Source="ms-appx:///Styles/Application/Colors.xaml" />
<ResourceDictionary Source="ms-appx:///Styles/Application/Fonts.xaml" />
<ResourceDictionary Source="ms-appx:///Styles/Button.xaml" />

Просмотреть файл

@ -0,0 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<FontFamily x:Key="CupertinoFontFamily">ms-appx:///Assets/Fonts/Cupertino/SF-Pro.ttf#SF Pro</FontFamily>
</ResourceDictionary>

Просмотреть файл

@ -0,0 +1,8 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<FontFamily x:Key="MaterialLightFontFamily">ms-appx:///Assets/Fonts/Material/Roboto-Light.ttf#Roboto</FontFamily>
<FontFamily x:Key="MaterialMediumFontFamily">ms-appx:///Assets/Fonts/Material/Roboto-Medium.ttf#Roboto</FontFamily>
<FontFamily x:Key="MaterialRegularFontFamily">ms-appx:///Assets/Fonts/Material/Roboto-Regular.ttf#Roboto</FontFamily>
</ResourceDictionary>

Просмотреть файл

@ -7,6 +7,4 @@
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="android ios wasm">
<FontFamily x:Key="RobotoMonoFontFamily">ms-appx:///Assets/Fonts/Material/RobotoMono-VariableFont_wght.ttf#Roboto Mono</FontFamily>
<FontFamily x:Key="SFProFontFamily">ms-appx:///Assets/Fonts/Cupertino/SF-Pro.ttf#SF Pro</FontFamily>
</ResourceDictionary>

Просмотреть файл

@ -51,7 +51,7 @@
VerticalScrollBarVisibility="Visible">
<TextBlock Text="{TemplateBinding Content}"
FontFamily="{StaticResource RobotoMonoFontFamily}"
FontFamily="{StaticResource MaterialRegularFontFamily}"
IsTextSelectionEnabled="True"
Margin="16" />
</ScrollViewer>

Просмотреть файл

@ -168,6 +168,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)CupertinoFontsOverride.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)MaterialFontsOverride.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Shell.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>

Просмотреть файл

@ -17,8 +17,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Uno.Cupertino" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Material" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Cupertino" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.Material" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.UI.Skia.Gtk" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.UI.RemoteControl" Version="4.0.0-dev.5612" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.0.0-dev.5612" />

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -12,10 +12,10 @@
</PackageReference>
<PackageReference Include="Microsoft.UI.Xaml" Version="2.6.0-prerelease.210623001" />
<PackageReference Include="Uno.Cupertino">
<Version>1.1.0-dev.31</Version>
<Version>1.1.0-dev.43</Version>
</PackageReference>
<PackageReference Include="Uno.Material">
<Version>1.1.0-dev.31</Version>
<Version>1.1.0-dev.43</Version>
</PackageReference>
<PackageReference Include="Uno.UI" Version="4.0.0-dev.5612" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
@ -156,8 +156,10 @@
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<Content Include="Assets\Fonts\Material\RobotoMono-VariableFont_wght.ttf" />
<AndroidAsset Include="Assets\Fonts\Cupertino\SF-Pro.ttf" />
<Content Include="Assets\Fonts\Cupertino\SF-Pro.ttf" />
<Content Include="Assets\Fonts\Material\Roboto-Light.ttf" />
<Content Include="Assets\Fonts\Material\Roboto-Medium.ttf" />
<Content Include="Assets\Fonts\Material\Roboto-Regular.ttf" />
<None Include="Uno.Toolkit.Samples.UWP_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
@ -169,6 +171,7 @@
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
<Content Include="Properties\Default.rd.xml" />
</ItemGroup>
<ItemGroup />
<Import Project="..\Uno.Toolkit.Samples.Shared\Uno.Toolkit.Samples.Shared.projitems" Label="Shared" />
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>

Просмотреть файл

@ -42,9 +42,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Uno.Cupertino" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Cupertino" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.0.1" />
<PackageReference Include="Uno.Material" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Material" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.UI.WebAssembly" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.UI.RemoteControl" Version="4.0.0-dev.5612" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Uno.Wasm.Bootstrap" Version="3.0.0" />

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -42,6 +42,10 @@
<key>UIAppFonts</key>
<array>
<string>Fonts/uno-fluentui-assets.ttf</string>
<string>Fonts/Roboto-Light.ttf</string>
<string>Fonts/Roboto-Medium.ttf</string>
<string>Fonts/Roboto-Regular.ttf</string>
<string>Fonts/SF-Pro.ttf</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -156,9 +156,11 @@
<BundleResource Include="Resources\SplashScreen%402x.png" />
<BundleResource Include="Resources\SplashScreen%403x.png" />
<BundleResource Include="Resources\Default-568h%402x.png" />
<BundleResource Include="Resources\Fonts\Material\RobotoMono-VariableFont_wght.ttf" />
<BundleResource Include="Resources\Fonts\Cupertino\SF-Pro.ttf" />
<BundleResource Include="Resources\Fonts\SF-Pro.ttf" />
<InterfaceDefinition Include="LaunchScreen.storyboard" />
<BundleResource Include="Resources\Fonts\Roboto-Light.ttf" />
<BundleResource Include="Resources\Fonts\Roboto-Medium.ttf" />
<BundleResource Include="Resources\Fonts\Roboto-Regular.ttf" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
@ -181,19 +183,19 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Uno.Cupertino">
<Version>1.1.0-dev.31</Version>
<Version>1.1.0-dev.43</Version>
</PackageReference>
<PackageReference Include="Uno.Material">
<Version>1.1.0-dev.31</Version>
<Version>1.1.0-dev.43</Version>
</PackageReference>
<PackageReference Include="Uno.UI" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.UI.RemoteControl" Version="4.0.0-dev.5612" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Uno.Extensions.Logging.OSLog " Version="1.1.0" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.Core.Extensions.Compatibility" Version="4.0.0-dev.7" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.0-dev.7" />
</ItemGroup>
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.Core.Extensions.Compatibility" Version="4.0.0-dev.7" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.0-dev.7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\library\Uno.Toolkit.Cupertino\Uno.Toolkit.UI.Cupertino.csproj">
<Project>{a49b9100-805e-4a8d-bb0a-c313609b2e82}</Project>
@ -208,6 +210,7 @@
<Name>Uno.Toolkit.UI</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="..\Uno.Toolkit.Samples.Shared\Uno.Toolkit.Samples.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
</Project>
</Project>

Просмотреть файл

@ -27,6 +27,6 @@
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
<key>ATSApplicationFontsPath</key>
<string>Fonts/uno-fluentui-assets.ttf</string>
<string>Fonts</string>
</dict>
</plist>

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -71,19 +71,19 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Uno.Cupertino">
<Version>1.1.0-dev.31</Version>
<Version>1.1.0-dev.43</Version>
</PackageReference>
<PackageReference Include="Uno.Material">
<Version>1.1.0-dev.31</Version>
<Version>1.1.0-dev.43</Version>
</PackageReference>
<PackageReference Include="Uno.UI" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.UI.RemoteControl" Version="4.0.0-dev.5612" Condition="'$(Configuration)'=='Debug'" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.Core.Extensions.Compatibility" Version="4.0.0-dev.7" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.0-dev.7" />
</ItemGroup>
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="4.0.0-dev.5612" />
<PackageReference Include="Uno.Core.Extensions.Compatibility" Version="4.0.0-dev.7" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.0-dev.7" />
</ItemGroup>
<Import Project="..\Uno.Toolkit.Samples.Shared\Uno.Toolkit.Samples.Shared.projitems" Label="Shared" />
<ItemGroup>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
@ -105,8 +105,10 @@
<ItemGroup>
<None Include="Info.plist" />
<None Include="Entitlements.plist" />
<AndroidAsset Include="Resources\Fonts\Cupertino\SF-Pro.ttf" />
<None Include="Resources\Fonts\Material\RobotoMono-VariableFont_wght.ttf" />
<BundleResource Include="Resources\Fonts\SF-Pro.ttf" />
<BundleResource Include="Resources\Fonts\Roboto-Light.ttf" />
<BundleResource Include="Resources\Fonts\Roboto-Medium.ttf" />
<BundleResource Include="Resources\Fonts\Roboto-Regular.ttf" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
@ -151,4 +153,4 @@
<ReferencePath Remove="@(_ReferencePathToRemove)" />
</ItemGroup>
</Target>
</Project>
</Project>

Просмотреть файл

@ -14,8 +14,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.Cupertino" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Material" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Cupertino" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.Material" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.UI" Version="4.0.0-dev.5612" />
</ItemGroup>

Просмотреть файл

@ -16,8 +16,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.Cupertino.WinUI" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Material.WinUI" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Cupertino.WinUI" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.Material.WinUI" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.WinUI" Version="4.0.0-dev.5612" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.18362.16" Condition="'$(TargetFramework)'=='net5.0-windows10.0.18362'" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.16" Condition="'$(TargetFramework)'=='net5.0-windows10.0.18362'" />

Просмотреть файл

@ -1,7 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkitLib="using:Uno.Toolkit.UI.Controls"
xmlns:utu="using:Uno.Toolkit.UI.Controls"
xmlns:controls="using:Uno.Material.Controls"
xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:not_win="http://uno.ui/not_win"
@ -83,7 +83,7 @@
</Style>
<Style x:Key="BaseMaterialFilledChipStyle"
TargetType="toolkitLib:Chip">
TargetType="utu:Chip">
<Setter Property="VerticalAlignment"
Value="Stretch" />
<Setter Property="VerticalContentAlignment"
@ -99,10 +99,10 @@
<Setter Property="Padding"
Value="4,0" />
<Setter Property="FontFamily"
Value="{StaticResource MaterialFontFamily}" />
Value="{StaticResource MaterialRegularFontFamily}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="toolkitLib:Chip">
<ControlTemplate TargetType="utu:Chip">
<Grid>
<VisualStateManager.VisualStateGroups>
@ -220,7 +220,7 @@
</Style>
<Style x:Key="BaseMaterialOutlinedChipStyle"
TargetType="toolkitLib:Chip">
TargetType="utu:Chip">
<Setter Property="VerticalAlignment"
Value="Stretch" />
<Setter Property="VerticalContentAlignment"
@ -240,10 +240,10 @@
<Setter Property="Padding"
Value="4,0" />
<Setter Property="FontFamily"
Value="{StaticResource MaterialFontFamily}" />
Value="{StaticResource MaterialRegularFontFamily}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="toolkitLib:Chip">
<ControlTemplate TargetType="utu:Chip">
<Grid>
<VisualStateManager.VisualStateGroups>
@ -357,7 +357,7 @@
<!-- Begin Input Chip -->
<Style x:Name="MaterialFilledInputChipStyle"
TargetType="toolkitLib:Chip"
TargetType="utu:Chip"
BasedOn="{StaticResource BaseMaterialFilledChipStyle}">
<Style.Setters>
<Setter Property="CanRemove"
@ -368,7 +368,7 @@
</Style>
<Style x:Name="MaterialOutlinedInputChipStyle"
TargetType="toolkitLib:Chip"
TargetType="utu:Chip"
BasedOn="{StaticResource BaseMaterialOutlinedChipStyle}">
<Style.Setters>
<Setter Property="CanRemove"
@ -379,7 +379,7 @@
<!-- Begin Choice Chip -->
<Style x:Key="MaterialFilledChoiceChipStyle"
TargetType="toolkitLib:Chip"
TargetType="utu:Chip"
BasedOn="{StaticResource BaseMaterialFilledChipStyle}">
<Setter Property="Background"
Value="{StaticResource MaterialOnSurfacePressedBrush}" />
@ -391,7 +391,7 @@
Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="toolkitLib:Chip">
<ControlTemplate TargetType="utu:Chip">
<Grid>
<VisualStateManager.VisualStateGroups>
@ -484,7 +484,7 @@
</Style>
<Style x:Key="MaterialOutlinedChoiceChipStyle"
TargetType="toolkitLib:Chip"
TargetType="utu:Chip"
BasedOn="{StaticResource BaseMaterialOutlinedChipStyle}">
<Setter Property="Background"
Value="{StaticResource MaterialSurfaceBrush}" />
@ -498,7 +498,7 @@
Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="toolkitLib:Chip">
<ControlTemplate TargetType="utu:Chip">
<Grid>
<VisualStateManager.VisualStateGroups>
@ -597,7 +597,7 @@
<!-- Begin Filter Chip -->
<Style x:Key="MaterialFilledFilterChipStyle"
TargetType="toolkitLib:Chip"
TargetType="utu:Chip"
BasedOn="{StaticResource BaseMaterialFilledChipStyle}">
<Setter Property="CanRemove"
Value="False" />
@ -605,7 +605,7 @@
Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="toolkitLib:Chip">
<ControlTemplate TargetType="utu:Chip">
<Grid>
<VisualStateManager.VisualStateGroups>
@ -713,7 +713,7 @@
</Style>
<Style x:Key="MaterialOutlinedFilterChipStyle"
TargetType="toolkitLib:Chip"
TargetType="utu:Chip"
BasedOn="{StaticResource BaseMaterialOutlinedChipStyle}">
<Setter Property="CanRemove"
Value="False" />
@ -721,7 +721,7 @@
Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="toolkitLib:Chip">
<ControlTemplate TargetType="utu:Chip">
<Grid>
<VisualStateManager.VisualStateGroups>
@ -826,11 +826,11 @@
<!-- Begin Action Chip -->
<Style x:Key="MaterialFilledActionChipStyle"
TargetType="toolkitLib:Chip"
TargetType="utu:Chip"
BasedOn="{StaticResource BaseMaterialFilledChipStyle}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="toolkitLib:Chip">
<ControlTemplate TargetType="utu:Chip">
<Grid>
<VisualStateManager.VisualStateGroups>
@ -925,10 +925,10 @@
<Style x:Key="MaterialOutlinedActionChipStyle"
BasedOn="{StaticResource BaseMaterialOutlinedChipStyle}"
TargetType="toolkitLib:Chip">
TargetType="utu:Chip">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="toolkitLib:Chip">
<ControlTemplate TargetType="utu:Chip">
<Grid>
<VisualStateManager.VisualStateGroups>

Просмотреть файл

@ -4,10 +4,10 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:android="http://nventive.com/android"
xmlns:ios="http://nventive.com/ios"
xmlns:not_win="http://uno.ui/not_win"
xmlns:not_win="http://uno.ui/not_win"
xmlns:toolkit="using:Uno.UI.Toolkit"
xmlns:toolkitLib="using:Uno.Toolkit.UI.Controls"
xmlns:controls="using:Uno.Material.Controls"
xmlns:utu="using:Uno.Toolkit.UI.Controls"
xmlns:controls="using:Uno.Material.Controls"
xmlns:contract4Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,4)"
xmlns:contract6Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,6)"
xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
@ -18,44 +18,43 @@
xmlns:contract6NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,6)"
xmlns:contract5NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,5)"
mc:Ignorable="android ios not_win">
<ResourceDictionary.MergedDictionaries>
<MaterialColors xmlns="using:Uno.Material" />
<ToolkitResources xmlns="using:Uno.Toolkit.UI" />
</ResourceDictionary.MergedDictionaries>
<x:Double x:Key="MaterialNavigationBarElevation">4</x:Double>
<ResourceDictionary.MergedDictionaries>
<MaterialColors xmlns="using:Uno.Material" />
<ToolkitResources xmlns="using:Uno.Toolkit.UI" />
</ResourceDictionary.MergedDictionaries>
<x:Double x:Key="MaterialNavigationBarElevation">4</x:Double>
<x:Double x:Key="MaterialNavigationBarHeight">48</x:Double>
<Thickness x:Key="MaterialNavigationBarContentMargin">16,0,0,0</Thickness>
<Thickness x:Key="MaterialNavigationBarContentMargin">16,0,0,0</Thickness>
<ios:ControlTemplate x:Key="NativeNavigationBarTemplate"
TargetType="toolkitLib:NavigationBar">
TargetType="utu:NavigationBar">
<!-- We use BorderBrush instead of Background to ensure that semi-transparent background of Grid and NativeCommandBarPresenter don't add up -->
<Border BorderBrush="{TemplateBinding Background}"
BorderThickness="{TemplateBinding Padding}"
Background="{TemplateBinding Background}">
<toolkitLib:NativeNavigationBarPresenter Height="44"
x:Name="NavigationBarPresenter" />
<utu:NativeNavigationBarPresenter Height="44"
x:Name="NavigationBarPresenter" />
</Border>
</ios:ControlTemplate>
<android:ControlTemplate x:Key="NativeNavigationBarTemplate"
TargetType="toolkitLib:NavigationBar">
<toolkitLib:NativeNavigationBarPresenter x:Name="NavigationBarPresenter" />
TargetType="utu:NavigationBar">
<utu:NativeNavigationBarPresenter x:Name="NavigationBarPresenter" />
</android:ControlTemplate>
<ControlTemplate x:Key="XamlMaterialNavigationBarTemplate"
TargetType="toolkitLib:NavigationBar">
<toolkitLib:NavigationBarPresenter Style="{StaticResource MaterialNavigationBarPresenter}"
x:Name="NavigationBarPresenter" />
TargetType="utu:NavigationBar">
<utu:NavigationBarPresenter Style="{StaticResource MaterialNavigationBarPresenter}"
x:Name="NavigationBarPresenter" />
</ControlTemplate>
<Style x:Key="MaterialNavigationBarPresenter"
TargetType="toolkitLib:NavigationBarPresenter">
TargetType="utu:NavigationBarPresenter">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="toolkitLib:NavigationBarPresenter">
<ControlTemplate TargetType="utu:NavigationBarPresenter">
<CommandBar x:Name="XamlNavigationBarCommandBar"
Style="{StaticResource MaterialNavigationBarCommandBar}" />
</ControlTemplate>
@ -63,7 +62,7 @@
</Setter>
</Style>
<Style x:Key="MaterialNavigationBarCommandBar"
<Style x:Key="MaterialNavigationBarCommandBar"
TargetType="CommandBar">
<Setter Property="Background"
Value="{ThemeResource CommandBarBackground}" />
@ -112,221 +111,222 @@
KeySpline="{StaticResource ControlFastOutSlowInKeySpline}"
Value="0" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<x:Double x:Key="AppBarButtonContentHeight">24</x:Double>
<x:Double x:Key="AppBarThemeCompactHeight">56</x:Double>
<Style TargetType="SplitButton"
</Storyboard>
<x:Double x:Key="AppBarButtonContentHeight">24</x:Double>
<x:Double x:Key="AppBarThemeCompactHeight">56</x:Double>
<Style TargetType="SplitButton"
BasedOn="{StaticResource SplitButtonCommandBarStyle}" />
<Style TargetType="ToggleSplitButton"
BasedOn="{StaticResource SplitButtonCommandBarStyle}" />
<Style TargetType="AppBarButton"
BasedOn="{StaticResource MaterialAppBarButton}">
<Setter Property="Padding" Value="12,16,12,16" />
</Style>
</Grid.Resources>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EllipsisIcon"
<Style TargetType="AppBarButton"
BasedOn="{StaticResource MaterialAppBarButton}">
<Setter Property="Padding"
Value="12,16,12,16" />
</Style>
</Grid.Resources>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EllipsisIcon"
Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0"
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource CommandBarEllipsisIconForegroundDisabled}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="DisplayModeStates">
<contract8Present:VisualStateGroup.Transitions>
<!-- UNO WORKAROUND: Use literal value of ControlNormalAnimationDuration. Resolving a StaticResource string to a string non-DP causes an exception -->
<VisualTransition From="CompactClosed"
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="DisplayModeStates">
<contract8Present:VisualStateGroup.Transitions>
<!-- UNO WORKAROUND: Use literal value of ControlNormalAnimationDuration. Resolving a StaticResource string to a string non-DP causes an exception -->
<VisualTransition From="CompactClosed"
To="CompactOpenDown"
GeneratedDuration="00:00:00.250">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OpenBorder"
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OpenBorder"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton"
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton"
Storyboard.TargetProperty="VerticalAlignment">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Stretch" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighContrastBorder"
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighContrastBorder"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRoot"
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRoot"
Storyboard.TargetProperty="Opacity">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="1" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRootTransform"
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRootTransform"
Storyboard.TargetProperty="Y">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="{ThemeResource AppBarThemeCompactHeight}" />
<SplineDoubleKeyFrame KeyTime="{StaticResource ControlNormalAnimationDuration}"
<SplineDoubleKeyFrame KeyTime="{StaticResource ControlNormalAnimationDuration}"
KeySpline="{StaticResource ControlFastOutSlowInKeySpline}"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandBarTemplateSettings.ContentHeight}" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentTransform"
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentTransform"
Storyboard.TargetProperty="Y">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandBarTemplateSettings.NegativeOverflowContentHeight}" />
<SplineDoubleKeyFrame KeyTime="{StaticResource ControlNormalAnimationDuration}"
<SplineDoubleKeyFrame KeyTime="{StaticResource ControlNormalAnimationDuration}"
KeySpline="{StaticResource ControlFastOutSlowInKeySpline}"
Value="0" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualTransition>
<!-- UNO WORKAROUND: Use literal value of ControlFastAnimationDuration. Resolving a StaticResource string to a string non-DP causes an exception -->
<VisualTransition From="CompactOpenDown"
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualTransition>
<!-- UNO WORKAROUND: Use literal value of ControlFastAnimationDuration. Resolving a StaticResource string to a string non-DP causes an exception -->
<VisualTransition From="CompactOpenDown"
To="CompactClosed"
GeneratedDuration="00:00:00.167">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton"
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton"
Storyboard.TargetProperty="VerticalAlignment">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Stretch" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighContrastBorder"
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighContrastBorder"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRoot"
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRoot"
Storyboard.TargetProperty="Opacity">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="1" />
<DiscreteDoubleKeyFrame KeyTime="{StaticResource ControlFastAnimationDuration}"
<DiscreteDoubleKeyFrame KeyTime="{StaticResource ControlFastAnimationDuration}"
Value="0" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRootTransform"
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRootTransform"
Storyboard.TargetProperty="Y">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandBarTemplateSettings.ContentHeight}" />
<SplineDoubleKeyFrame KeyTime="{StaticResource ControlFastAnimationDuration}"
<SplineDoubleKeyFrame KeyTime="{StaticResource ControlFastAnimationDuration}"
KeySpline="{StaticResource ControlFastOutSlowInKeySpline}"
Value="{ThemeResource AppBarThemeCompactHeight}" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentTransform"
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentTransform"
Storyboard.TargetProperty="Y">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="0" />
<SplineDoubleKeyFrame KeyTime="{StaticResource ControlFastAnimationDuration}"
<SplineDoubleKeyFrame KeyTime="{StaticResource ControlFastAnimationDuration}"
KeySpline="{StaticResource ControlFastOutSlowInKeySpline}"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandBarTemplateSettings.NegativeOverflowContentHeight}" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualTransition>
</contract8Present:VisualStateGroup.Transitions>
<VisualState x:Name="CompactClosed" />
<VisualState x:Name="CompactOpenUp">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OpenBorder"
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualTransition>
</contract8Present:VisualStateGroup.Transitions>
<VisualState x:Name="CompactClosed" />
<VisualState x:Name="CompactOpenUp">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OpenBorder"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton"
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton"
Storyboard.TargetProperty="VerticalAlignment">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Stretch" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighContrastBorder"
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighContrastBorder"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRoot"
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRoot"
Storyboard.TargetProperty="Opacity">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="1" />
</DoubleAnimationUsingKeyFrames>
<contract8Present:DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRootTransform"
</DoubleAnimationUsingKeyFrames>
<contract8Present:DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRootTransform"
Storyboard.TargetProperty="Y">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandBarTemplateSettings.OverflowContentCompactYTranslation}" />
</contract8Present:DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRootMarginOffsetTransform"
</contract8Present:DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRootMarginOffsetTransform"
Storyboard.TargetProperty="Y">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandBarTemplateSettings.ContentHeight}" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="CompactOpenDown">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OpenBorder"
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="CompactOpenDown">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OpenBorder"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton"
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton"
Storyboard.TargetProperty="VerticalAlignment">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Stretch" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighContrastBorder"
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighContrastBorder"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRoot"
</ObjectAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRoot"
Storyboard.TargetProperty="Opacity">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="1" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRootTransform"
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRootTransform"
Storyboard.TargetProperty="Y">
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
<DiscreteDoubleKeyFrame KeyTime="0:0:0"
Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandBarTemplateSettings.ContentHeight}" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="AvailableCommandsStates">
<VisualState x:Name="BothCommands" />
<VisualState x:Name="PrimaryCommandsOnly">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRoot"
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="AvailableCommandsStates">
<VisualState x:Name="BothCommands" />
<VisualState x:Name="PrimaryCommandsOnly">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OverflowContentRoot"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton"
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="SecondaryCommandsOnly">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PrimaryItemsControl"
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="SecondaryCommandsOnly">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PrimaryItemsControl"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0:0:0"
<DiscreteObjectKeyFrame KeyTime="0:0:0"
Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="DynamicOverflowStates">
<VisualState x:Name="DynamicOverflowDisabled" />
<VisualState x:Name="DynamicOverflowEnabled">
<VisualState.Setters>
<Setter Target="ContentControlColumnDefinition.Width"
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="DynamicOverflowStates">
<VisualState x:Name="DynamicOverflowDisabled" />
<VisualState x:Name="DynamicOverflowEnabled">
<VisualState.Setters>
<Setter Target="ContentControlColumnDefinition.Width"
Value="Auto" />
<Setter Target="PrimaryItemsControlColumnDefinition.Width"
<Setter Target="PrimaryItemsControlColumnDefinition.Width"
Value="*" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="ContentRoot"
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="ContentRoot"
VerticalAlignment="Center"
Height="{TemplateBinding Height}"
MinHeight="{ThemeResource AppBarThemeCompactHeight}"
@ -349,14 +349,14 @@
<ColumnDefinition x:Name="PrimaryItemsControlColumnDefinition"
Width="Auto" />
</Grid.ColumnDefinitions>
<ContentPresenter x:Name="MainCommandPresenter"
Content="{Binding Path=(toolkitLib:CommandBarExtensions.MainCommand), RelativeSource={RelativeSource TemplatedParent}}">
<ContentPresenter.Resources>
<x:Double x:Key="AppBarButtonContentHeight">16</x:Double>
</ContentPresenter.Resources>
</ContentPresenter>
<ContentPresenter x:Name="MainCommandPresenter"
Content="{Binding Path=(utu:CommandBarExtensions.MainCommand), RelativeSource={RelativeSource TemplatedParent}}">
<ContentPresenter.Resources>
<x:Double x:Key="AppBarButtonContentHeight">16</x:Double>
</ContentPresenter.Resources>
</ContentPresenter>
<!--
<!--
Use a ContentControl rather than a ContentPresenter so that IsEnabled can be set to false
in the Minimal/HiddenClosed states to remove it from being a tab-stop candidate.
-->
@ -368,9 +368,9 @@
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}"
Foreground="{TemplateBinding Foreground}"
FontFamily="{StaticResource MaterialFontFamily}"
FontSize="20"
FontWeight="Medium"
FontFamily="{StaticResource MaterialRegularFontFamily}"
FontSize="20"
FontWeight="Medium"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
@ -403,12 +403,12 @@
FontSize="20"
Glyph="&#xe712;"
Height="20"
RenderTransformOrigin="0.5, 0.5">
RenderTransformOrigin="0.5, 0.5">
<FontIcon.RenderTransform>
<RotateTransform Angle="90" />
</FontIcon.RenderTransform>
</FontIcon>
</Button>
</Button>
<!-- UNO WORKAROUND: Added IsHitTestVisible="False". The Rectangle was blocking pointer events -->
<Rectangle x:Name="HighContrastBorder"
x:DeferLoadStrategy="Lazy"
@ -432,7 +432,8 @@
<Popup.RenderTransform>
<TransformGroup>
<TranslateTransform x:Name="OverflowContentRootMarginOffsetTransform" />
<TranslateTransform x:Name="OverflowContentRootTransform" X="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandBarTemplateSettings.OverflowContentHorizontalOffset}" />
<TranslateTransform x:Name="OverflowContentRootTransform"
X="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CommandBarTemplateSettings.OverflowContentHorizontalOffset}" />
</TransformGroup>
</Popup.RenderTransform>
<Grid x:Name="OverflowContentRoot"
@ -488,54 +489,69 @@
</Setter>
</Style>
<Style x:Key="MaterialEllipsisButton"
TargetType="Button">
<Setter Property="Background"
Value="{ThemeResource AppBarButtonBackground}" />
<Setter Property="Foreground"
Value="{ThemeResource AppBarButtonForeground}" />
<Setter Property="BorderBrush"
Value="{ThemeResource AppBarButtonBorderBrush}" />
<Setter Property="BorderThickness"
Value="0" />
<Setter Property="Padding"
Value="0" />
<Setter Property="HorizontalAlignment"
Value="Stretch" />
<Setter Property="HorizontalContentAlignment"
Value="Center" />
<Setter Property="VerticalAlignment"
Value="Stretch" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="FontFamily"
Value="{StaticResource MaterialRegularFontFamily}" />
<Setter Property="FontWeight"
Value="SemiBold" />
<Setter Property="FontSize"
Value="{ThemeResource ControlContentThemeFontSize}" />
<Setter Property="Width"
Value="{ThemeResource AppBarExpandButtonThemeWidth}" />
<Setter Property="UseSystemFocusVisuals"
Value="{StaticResource UseSystemFocusVisuals}" />
<Setter Property="FocusVisualMargin"
Value="-3" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Background="Transparent">
<controls:Ripple Feedback="{TemplateBinding Foreground}"
FeedbackOpacity="{StaticResource MaterialPressedOpacity}">
<ContentPresenter x:Name="ContentPresenter"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
ContentTransitions="{TemplateBinding ContentTransitions}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}"
Margin="{StaticResource AppBarEllipsisButtonInnerBorderMargin}"
Padding="0"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw"
Control.IsTemplateFocusTarget="True" />
</controls:Ripple>
<Style x:Key="MaterialEllipsisButton" TargetType="Button">
<Setter Property="Background" Value="{ThemeResource AppBarButtonBackground}" />
<Setter Property="Foreground" Value="{ThemeResource AppBarButtonForeground}" />
<Setter Property="BorderBrush" Value="{ThemeResource AppBarButtonBorderBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontFamily" Value="{StaticResource MaterialFontFamily}" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
<Setter Property="Width" Value="{ThemeResource AppBarExpandButtonThemeWidth}" />
<Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
<Setter Property="FocusVisualMargin" Value="-3" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Background="Transparent">
<controls:Ripple Feedback="{TemplateBinding Foreground}"
FeedbackOpacity="{StaticResource MaterialPressedOpacity}">
<ContentPresenter x:Name="ContentPresenter"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
contract7Present:CornerRadius="{TemplateBinding CornerRadius}"
ContentTransitions="{TemplateBinding ContentTransitions}"
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}"
Margin="{StaticResource AppBarEllipsisButtonInnerBorderMargin}"
Padding="0"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
AutomationProperties.AccessibilityView="Raw"
Control.IsTemplateFocusTarget="True" />
</controls:Ripple>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="BaseMaterialNavigationBarStyle"
TargetType="toolkitLib:NavigationBar">
<Style x:Key="BaseMaterialNavigationBarStyle"
TargetType="utu:NavigationBar">
<!-- Setting content to empty to avoid getting the datacontext -->
<Setter Property="Content"
Value="" />
@ -558,9 +574,9 @@
Value="{StaticResource MaterialNavigationBarHeight}" />
<Setter Property="toolkit:VisibleBoundsPadding.PaddingMask"
Value="Top" />
<Setter Property="Padding"
Value="16,0,0,0"/>
<Setter Property="HorizontalAlignment"
<Setter Property="Padding"
Value="16,0,0,0" />
<Setter Property="HorizontalAlignment"
Value="Stretch" />
<Setter Property="VerticalAlignment"
Value="Top" />
@ -578,23 +594,22 @@
Value="{StaticResource XamlMaterialNavigationBarTemplate}" />
</Style>
<Style x:Key="BaseMaterialMainCommandStyle"
TargetType="AppBarButton"
BasedOn="{StaticResource MaterialAppBarButton}">
<Setter Property="Foreground"
Value="{ThemeResource MaterialOnPrimaryBrush}" />
</Style>
<Style x:Key="BaseMaterialMainCommandStyle"
TargetType="AppBarButton"
BasedOn="{StaticResource MaterialAppBarButton}">
<Setter Property="Foreground"
Value="{ThemeResource MaterialOnPrimaryBrush}" />
</Style>
<Style x:Key="BaseMaterialModalNavigationBarStyle"
TargetType="toolkitLib:NavigationBar"
BasedOn="{StaticResource BaseMaterialNavigationBarStyle}">
<Setter Property="MainCommandStyle"
Value="{StaticResource MaterialModalMainCommandStyle}" />
<Setter Property="Background"
Value="{ThemeResource MaterialSurfaceBrush}" />
<Setter Property="Foreground"
Value="{ThemeResource MaterialOnSurfaceBrush}"/>
</Style>
<Style x:Key="BaseMaterialModalNavigationBarStyle"
TargetType="utu:NavigationBar"
BasedOn="{StaticResource BaseMaterialNavigationBarStyle}">
<Setter Property="MainCommandStyle"
Value="{StaticResource MaterialModalMainCommandStyle}" />
<Setter Property="Background"
Value="{ThemeResource MaterialSurfaceBrush}" />
<Setter Property="Foreground"
Value="{ThemeResource MaterialOnSurfaceBrush}" />
</Style>
</ResourceDictionary>

Просмотреть файл

@ -15,8 +15,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.Cupertino" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Material" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Cupertino" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.Material" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.UI" Version="4.0.0-dev.5612" />
</ItemGroup>

Просмотреть файл

@ -16,8 +16,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Uno.Material.WinUI" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Cupertino.WinUI" Version="1.1.0-dev.31" />
<PackageReference Include="Uno.Material.WinUI" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.Cupertino.WinUI" Version="1.1.0-dev.43" />
<PackageReference Include="Uno.WinUI" Version="4.0.0-dev.5612" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.18362.16" Condition="'$(TargetFramework)'=='net5.0-windows10.0.18362'" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.18362.16" Condition="'$(TargetFramework)'=='net5.0-windows10.0.18362'" />