我想问一下如何从我的主页添加一个过渡(从左到右滑动),当我在第二页点击返回按钮时,我还会向我的另一个页面添加一个过渡(从左到右滑动),我怎样才能做到这一点?
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>
主窗口.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());
}
}
}