我正在为我的 WPF 应用程序使用MahApps.Metro UI。这是一个很好的,满足我的需求,但如果有人告诉我如何在弹出窗口时禁用窗口动画,我会更高兴。
当我调用 Show() 方法时,会弹出新窗口并且我看到一个烦人的动画(内容从右向左滑动)。效果类似于下图中显示的另一个效果(但它显示选项卡和内容从左到右):
虚拟表格的示例请参见下文:
<controls:MetroWindow x:Class="TestProj.Views.TestView"
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"
mc:Ignorable="d"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:vm="clr-namespace:TestProj.ViewsModels"
Height="230" Width="550">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
</Grid>
</controls:MetroWindow>