使用C#在WPF中导航页面 [英] Navigating page in WPF using c#
本文介绍了使用C#在WPF中导航页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用程序中,我添加了一个tabcontrol.在我的第一个选项卡中,我有几个复选框,当我单击下一个按钮时,它应该在同一选项卡中显示另一个控件,如组合框.我该怎么办WPF.
http://code.msdn.microsoft.com/CSWPFPaging-ce1ce482 [
In my application I have added a tabcontrol. In my first tab i have a few checkbox and when i click on the next button it should show another controls like combo box in same tab . How can i do it WPF .
http://code.msdn.microsoft.com/CSWPFPaging-ce1ce482[^]
I used the above project as a reference but there are using data only i need to navigate page in the s
推荐答案
中导航页面.如果您正在查看基于浏览器的应用程序,请阅读关于导航概述 [
If you are looking at browser based applications, then read about the Navigation Overview[^].
If irs just a new tab you want to launch in a tab, you could create a new tab and then display a combo in it.
好,看来您正在寻找一个向导.
我看到的最好的事情就是使用导航窗口,就像我在文章中描述的那样.
WPF教程:布局-面板-容器和放大器;布局转换 [ ^ ]
但是,如果您不喜欢导航窗口"随附的布局,则可以实际模仿自己的布局以适合您.
只是发挥可见性.使用按钮"将可见性"应用于一组控件,可能是您的TabPage或StackPanel(任何东西).
在XAML中创建所有面板,或使用UserControl加载它,并在单击按钮时加载它们.您也可以使用MVVM.
我希望你能自己做.
让我知道.
Ok, so it seems that you are looking for a Wizard.
The best thing I see is by using Navigation Windows like one I have described in my article.
WPF Tutorial : Layout-Panels-Containers & Layout Transformation[^]
But if you do not like the layout that comes with the Navigation Window, you can actually mimic the same yourself to suit you.
Just play with Visibility. Use a Button to apply Visibility to a set of controls, may be your TabPage, or a StackPanel (anything).
Create all the panels in your XAML or load it using UserControl and Load them when you click on a button. You can use MVVM too.
I hope you can do it yourself.
Let me know.
这篇关于使用C#在WPF中导航页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文