创建类似Visual Studio的属性页(非属性网格) [英] Create Visual Studio Like Properties Page (Not Property Grid)
问题描述
我对使用WPF创建类似于Visual Studio 2010属性页的控件感兴趣.不是属性网格(这是我所有搜索返回的结果),而是项目的实际属性页面.
这是一张图片:
^ ]
关于最佳方法的任何建议吗?
谢谢!
I''m interested in creating a control that looks similar to the Visual Studio 2010 Property page using WPF. Not the property grid (which is what all my searches have returned) but the actual property page for the project.
Here is an image:
http://www.google.com/imgres?um=1&hl=en&client=firefox-a&sa=N&rls=org.mozilla:en-US:official&biw=1280&bih=920&tbm=isch&tbnid=i-Mt21CCbgKZuM:&imgrefurl=http://www.codeguru.com/vb/gen/article.php/c18579/Visual-Basic-Development-101-VS-2010-Part-2-Menus-and-Tools.htm&docid=FziMJTUtvY4SvM&imgurl=http://www.codeguru.com/dbfiles/get_image.php%253Fid%253D18579%2526lbl%253DFIGURE_5_PNG%2526ds%253D20110303&w=784&h=564&ei=NJM-T5WxPOrl0QHApvykDQ&zoom=1&iact=hc&vpx=814&vpy=261&dur=4240&hovh=190&hovw=265&tx=129&ty=134&sig=109744195412070778756&page=1&tbnh=146&tbnw=205&start=0&ndsp=24&ved=0CFwQrQMwBA[^]
Any suggestions on the best way to do this?
Thanks!
推荐答案
很抱歉,我认为您的意思是ASP控件.这是WPF之一:
首先是标记:
I am sorry, I thought you mean an ASP control. here is the WPF one:
first the markups:
<Grid>
<StackPanel Name="Tabs" HorizontalAlignment="Left" Width="70">
<StackPanel Name="Tab1" >
<Label Content="Tab1" Height="30" />
</StackPanel>
<StackPanel Name="Tab2" >
<Label Content="Tab2" Height="30" />
</StackPanel>
</StackPanel>
<StackPanel Name="Contents" Margin="70,0,0,0" >
<StackPanel Name="Content1">
<Label Content="Content Content Content" />
<Label Content="Content Content Content" />
</StackPanel>
<StackPanel Name="Content2" Visibility="Hidden">
<Label Content="Content Content Content" />
<Label Content="Content Content Content" />
</StackPanel>
</StackPanel>
</Grid>
之后,单击选项卡上的单击以切换内容的可见性.
after that handle the clicks on the tabs to togle the visibility of the contents.
答案实际上非常简单:
The answer was actually really easy:
<TabControl TabStripPlacement="Left">
这篇关于创建类似Visual Studio的属性页(非属性网格)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!