ある UserControl から別の UserControl に移動するときにアニメーションを作成したいと考えています。MS PowerPoint のエフェクトのような単純なアニメーションにすることができます。
どうすれば始められますか?
編集:
次のxamlを見てみましょう
<StackPanel>
<Label>
<Hyperlink Click="ConfigureAccounts_Click">
<TextBlock>Configure Accounts</TextBlock>
</Hyperlink>
</Label>
<Label>
<Hyperlink Click="ConfigurePassangersList_Click">
<TextBlock>Accounts</TextBlock>
</Hyperlink>
</Label>
</StackPanel>
ここで私がやっているハイパーリンクをクリックすると-
private void ConfigureAccounts_Click(object sender, RoutedEventArgs e)
{
ContentGrid.Children.Clear();
//Here is the animation
ContentGrid.Children.Add(new ConfigureAccounts());
}
private void ConfigurePassangersList_Click(object sender, RoutedEventArgs e)
{
ContentGrid.Children.Clear();
//Here is the animation
ContentGrid.Children.Add(new ConfigurePassangersList());
}
私が呼び出している 2 つのコンストラクターは、単なる UserControls です。