使用Blend与页面事务 [英] Using Blend with Page Transactions
问题描述
嗨
Blend的全新,请原谅我,如果这是一个愚蠢的问题。
我有一个VS2010中的WPF项目
它包含一个MainWindow.xaml
< 窗口
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"
xmlns : ei =" http://schemas.microsoft.com/expression/2010/interactions"
xmlns : ee =" http://schemas.microsoft.com/expression/2010/effects"
xmlns : 我 =" http://schemas.microsoft.com/expression/2010/interactivity"
x : 类 =" MainWindow"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:ee="http://schemas.microsoft.com/expression/2010/effects" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" x:Class="MainWindow"
标题 =" MainWindow" 背景 =" Aqua"
MinHeight =" 768" MinWidth =" 1024"
mc : 可忽略 =" d"
d : DesignHeight =" 407"
d : DesignWidth =" 847"
SizeToContent =" WidthAndHeight">
Title="MainWindow" Background="Aqua" MinHeight="768" MinWidth="1024" mc:Ignorable="d" d:DesignHeight="407" d:DesignWidth="847" SizeToContent="WidthAndHeight">
< DockPanel 背景 =" BurlyWood">
< TextBlock 背景 ="黄色"
DockPanel.Dock =" Bottom" MinHeight =" 25"
高度 =" 29">
<TextBlock Background="Yellow" DockPanel.Dock="Bottom" MinHeight="25" Height="29">
< 按钮 内容 ="按钮"
高度 =" 23" x : 名称 =" Button1"
宽度 =" 75" />
<Button Content="Button" Height="23" x:Name="Button1" Width="75" />
< 按钮 内容 ="按钮"
高度 =" 23" x : 名称 =" Button2"
宽度 =" 75" />
<Button Content="Button" Height="23" x:Name="Button2" Width="75" />
< 按钮 内容 ="按钮"
高度 =" 23" 名称 =" Button3"
宽度 =" 75" />
<Button Content="Button" Height="23" Name="Button3" Width="75" />
< / TextBlock >
< 框架 x : 名称 =" MainFrame"
保证金 =" 5,10,10,5"
NavigationUIVisibility =" Hidden"
背景 =" Beige" />
< / DockPanel >
< / 窗口 >
背后的代码:
私人
Sub Button1_Click( ByVal
sender As System。 Object ,
ByVal e
As System.Windows。 RoutedEventArgs )
句柄 Button1.Click
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
MainFrame.Source =
新
Uri ( " /Forms/Page1.xaml" ,
UriKind 。相对)
结束
Sub
私人
Sub Button2_Click( ByVal
sender As System。 Object ,
ByVal e
As System.Windows。 RoutedEventArgs )
句柄 Button2.Click
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button2.Click
MainFrame.Source =
新
Uri ( " /Forms/Page2.xaml" ,
UriKind 。相对)
结束
Sub
和2页Page1.xaml和Page2.xaml
< 页面
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"
xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
xmlns : 我 =" http://schemas.microsoft.com/expression/2010/interactivity"
xmlns : ei =" http://schemas.microsoft.com/expression/2010/interactions"
xmlns : ee =" http://schemas.microsoft.com/expression/2010/effects"
x : 名称 =" page"
x : 类 =" Page2"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:ee="http://schemas.microsoft.com/expression/2010/effects" x:Name="page" x:Class="Page2"
背景 ="黄色"
mc : 可忽略 =" d"
标题 =" Page2" d : DesignHeight =" 321"
d : DesignWidth =" 633">
Title="Page2" d:DesignHeight="321" d:DesignWidth="633">
< 网格 x : 名称 =" grid"
背景 =" Coral">
< TextBlock x : 名称 =" textBlock">< 运行
Text =" Page 2" />< / TextBlock >
<TextBlock x:Name="textBlock"><Run Text="Page 2"/></TextBlock>
< / 网格 >
< / 页面 >
两个页面的代码相同,只有一个是Page1,另一个是Page2。
我想要发生的是当在MainWindow.xaml上单击其中一个按钮时,按钮的相应页面将以某种动画技术打开。非常类似
到这个网站:
当您单击此页面上的"导航"按钮时,您将看到该页面打开,就好像它从屏幕底部出现一样。
你如何在Blend 4中做到这一点?我见过其他程序员这样做,它看起来很容易但现在我在我的电脑前面我无法弄明白。
请帮助
谢谢
推荐答案
您好,¥b $ b
我很高兴看到你的问题,类似的解决方案是我在我的博客上发布的博客,这可能会帮助你做很多事情
Hello ,
I am glad to see your question, similar solution is what I have blogged on my blog and that might help you a lot in doing very stuff
这是我的博客,
http://www.expression-blend .com
我希望它可以帮助你!
问候,
这篇关于使用Blend与页面事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!