我想问一下如何从我的主页面添加一个过渡(从左到右滑动),当我在第二页上按回按钮时,我还会添加一个过渡(从左到右滑动)到我的其他页面,我该怎么做?
MainWindow.xaml:
<Window x:Class="Inventory.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
Title="MainPage" Height="643" Width="715" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen" Icon="Images/ad2eecf5e5ca5f2b98ba56f77efaa972.ico">
<Grid>
<Frame x:Name="MainFrame"/>
</Grid>
</Window>
MainWindow.cs
namespace Inventory
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
MainFrame.Navigate(new MainPage());
}
}
}
答案 0 :(得分:0)
从头开始开发视图转换并非易事,但幸运的是,有预先编写的库可以为我们做到这一点。到目前为止,我发现的最好的是Transitionals
。您可以从CodePlex的Transitionals页面下载dll。