如何使用按钮导航 [英] How to navigate using Buttons

查看:82
本文介绍了如何使用按钮导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我们打算将Visual Studio 2010与C#一起用作开发所有应用程序的新工具。目前我正在研究WPF和Expression Blend,并希望对所有新事物有所了解。

We intend to use Visual Studio 2010 with C# as our new tool for developing all our application. At the moment I am having a look at WPF and Expression Blend and want to get a bit familar with all of the new things.

我试图找出如何在页面之间导航WPF应用程序仅使用按钮。在Sketch中,可以设置"导航到"。按钮的属性。我无法在纯WPF应用程序中找到如何执行此操作。我搜索了网络和论坛几个小时但找不到可行的解决方案,因此有以下问题:

I tried to find out how to navigate between pages in a WPF application using only buttons. In Sketch, there is the possibility to set the "Navigate TO" property of the buttons. I cannot find out how to do this in a pure WPF-Application. I searched the Web and the Forum for several hours but couldn't find a working solution and therefore have the following questions:

- 是否可以仅使用XAML按钮进行导航? /> - 如果是,有人可以给我一个完整的工作示例吗?
- 我想看一个完整的WPF应用程序示例,其中使用了Menu,MenuItem和TabControls等控件,我可以看到它是如何工作的。在任何地方都有这样的例子

- Is it possible to navigate using buttons only using XAML?
- If YES, can someone give me a complete working example?
- I'd like to see a complete WPF Aplication example where controls like Menu, MenuItem and TabControls are used and where I can see how exactly this works. Is there such an example anywhere

非常感谢您提供任何帮助

Thanks a lot in advance for any help

Michael

 

推荐答案

在SketchFlow原型中的页面之间导航的概念是使用行为实现的(不是在逻辑意义上,但在某种意义上可以附加到元素的一段代码,特定于SketchFlow播放器。 它不适用于常规WPF。 但是有很多方法可以做你想要的。

The concept of navigating between pages in a SketchFlow prototype is implemented using a behavior (not in the logical sense, but in the sense of a piece of code that can be attached to an element) that is specific to the SketchFlow player.  It will not work in regular WPF.  There are many ways to do what you want however.

 

你可能正在寻找的是基于wpf的基于导航的应用程序。  ;如果你在Bing上搜索导航应用程序wpf,你会发现很多资源。 然后,您可以创建自己的行为,该行为适用于基于导航的框架,并将其附加到您的按钮或其他控件。 或者您可以使用事件处理程序后面的代码来处理页面之间的导航。

What you are probably looking for is a navigation based app in wpf.  If you search on Bing for navigation app wpf, you will find many resources.  You could then create your own behavior that applies to navigation based frames, and attach that to your buttons, or other controls.  Or you could just use the code behind event handlers to handle navigating between pages.


这篇关于如何使用按钮导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆