Skip to content

Commit

Permalink
[fix] 修复Release下部分XAML无法加载的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zxbmmmmmmmmm committed Feb 24, 2024
1 parent c0b3ac5 commit 5cf26aa
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
27 changes: 24 additions & 3 deletions FluentWeather.Uwp/Pages/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,18 @@
PropertyName="Visibility"
TargetObject="{x:Bind MainContentContainer}"
Value="Visible" />
<behaviors1:StartAnimationAction Animation="{x:Bind local:RootPage.Instance.ScaleAnimationLeave}" />
<behaviors:AnimateBackgroundAction>
<behaviors:AnimateBackgroundAction.Animation>
<animations:AnimationSet x:Name="ScaleAnimationLeave" x:FieldModifier="Public">
<animations:ScaleAnimation
EasingMode="EaseOut"
EasingType="Circle"
From="1.2"
To="1"
Duration="0:0:0.4" />
</animations:AnimationSet>
</behaviors:AnimateBackgroundAction.Animation>
</behaviors:AnimateBackgroundAction>
</core:EventTriggerBehavior>
</i:Interaction.Behaviors>
<animations:Implicit.HideAnimations>
Expand Down Expand Up @@ -388,8 +399,18 @@
<i:Interaction.Behaviors>
<behaviors:ListViewScrollBehavior />
<core:EventTriggerBehavior EventName="ItemClick">
<behaviors1:StartAnimationAction Animation="{x:Bind local:RootPage.Instance.ScaleAnimationEnter}" />

<behaviors:AnimateBackgroundAction>
<behaviors:AnimateBackgroundAction.Animation>
<animations:AnimationSet x:Name="ScaleAnimationEnter" x:FieldModifier="Public">
<animations:ScaleAnimation
EasingMode="EaseOut"
EasingType="Circle"
From="1"
To="1.2"
Duration="0:0:0.8" />
</animations:AnimationSet>
</behaviors:AnimateBackgroundAction.Animation>
</behaviors:AnimateBackgroundAction>
<core:ChangePropertyAction
PropertyName="Visibility"
TargetObject="{x:Bind MainContentContainer}"
Expand Down
2 changes: 2 additions & 0 deletions FluentWeather.Uwp/Properties/Default.rd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<Namespace Name="Microsoft.UI.Xaml.Controls" Serialize="All" />
<Namespace Name="Microsoft.Toolkit.Uwp.UI.Controls" Serialize="All" />
<Namespace Name="Microsoft.Toolkit.Uwp.UI.Animations" Serialize="All" />
<Namespace Name="FluentWeather.Uwp.ViewModels" Serialize="All" />
<Namespace Name="FluentWeather.Abstraction.Interfaces" Serialize="All" />

Expand Down
5 changes: 5 additions & 0 deletions FluentWeather.Uwp/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:FluentWeather.Uwp.Helpers.ValueConverters"
xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"
xmlns:local="using:FluentWeather.Uwp.Themes"
xmlns:models="using:FluentWeather.Abstraction.Models">
<ResourceDictionary.ThemeDictionaries>
Expand Down Expand Up @@ -1117,4 +1118,8 @@

</StackPanel>
</DataTemplate>


<!--Animations-->
<animations:TranslationAnimation x:Key="DefaultTranslationAnimation"/>
</ResourceDictionary>

0 comments on commit 5cf26aa

Please sign in to comment.