继续聊WPF——Expander控件(1)
这个控件最实用的地方,就是做导航栏。
- <StackPanel Margin="20,20" Width="100" Height="460" HorizontalAlignment="Left"
- VerticalAlignment="Top">
- <Expander VerticalAlignment="Stretch" ExpandDirection="Down" HorizontalContentAlignment="Left" SnapsToDevicePixels="True">
- <Expander.Header>
- <TextBlock Text="用户管理" FontSize="14" FontWeight="Bold" />
- </Expander.Header>
- <Expander.Content>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <RadioButton Grid.Row="0">会员管理</RadioButton>
- <RadioButton Grid.Row="1">角色管理</RadioButton>
- </Grid>
- </Expander.Content>
- </Expander>
- <Expander VerticalAlignment="Stretch" ExpandDirection="Down" HorizontalContentAlignment="Left" SnapsToDevicePixels="True">
- <Expander.Header>
- <TextBlock Text="文档管理" FontSize="14" FontWeight="Bold" />
- </Expander.Header>
- <Expander.Content>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <RadioButton Grid.Row="0">部门资料</RadioButton>
- <RadioButton Grid.Row="1">员工资料</RadioButton>
- <RadioButton Grid.Row="2">职位资料</RadioButton>
- </Grid>
- </Expander.Content>
- </Expander>
- <Expander VerticalAlignment="Stretch" ExpandDirection="Down" HorizontalContentAlignment="Left" SnapsToDevicePixels="True">
- <Expander.Header>
- <TextBlock Text="采购管理" FontSize="14" FontWeight="Bold" />
- </Expander.Header>
- <Expander.Content>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <RadioButton Grid.Row="0">采购计划</RadioButton>
- <RadioButton Grid.Row="1">需求分析</RadioButton>
- <RadioButton Grid.Row="2">采购单</RadioButton>
- <RadioButton Grid.Row="3">入库验收</RadioButton>
- <RadioButton Grid.Row="4">入库退回</RadioButton>
- </Grid>
- </Expander.Content>
- </Expander>
- <Expander VerticalAlignment="Stretch" ExpandDirection="Down" HorizontalContentAlignment="Left" SnapsToDevicePixels="True">
- <Expander.Header>
- <TextBlock Text="供应商" FontSize="14" FontWeight="Bold" />
- </Expander.Header>
- <Expander.Content>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="auto"/>
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <RadioButton Grid.Row="0">基本资料</RadioButton>
- <RadioButton Grid.Row="1">往来单位</RadioButton>
- <RadioButton Grid.Row="2">上游供应商</RadioButton>
- </Grid>
- </Expander.Content>
- </Expander>
- </StackPanel>
另外,通过ExpandDirection属性可控其展开的方向。
- <Expander VerticalAlignment="Stretch" ExpandDirection="Right" HorizontalContentAlignment="Left" SnapsToDevicePixels="True">
- ............
- </Expander>
继续聊WPF——Expander控件(1)的更多相关文章
- 继续聊WPF——Expander控件(2)
<Window x:Class="Expander_Sample2.Window1" xmlns="http://schemas.microsoft.com/win ...
- WPF Expander控件(扩展面板)
这算是我比较喜欢的一个控件,以前在Winform中也常用类似的.它包装了一块内容,通过单击一个小箭头按钮可以显示或隐藏所包含的内容.在线帮助以及Web页面经常使用这种技术,因为既可以包含大量内容,而又 ...
- 继续聊WPF——Thumb控件
这个控件,真不好介绍,MSDN上也是草草几句,反正就是可以让用户拖动的玩意儿,但是,你会发现,当你在该控件上拖动时,它没有反响,也就是说这个东西默认不做任何操作的,它是赖在那里什么都不干,除非你去踢上 ...
- WPF中Expander控件样式,ListBox的样式(带checkbox)恢复
Expander控件样式: <ControlTemplate x:Key="ExpanderToggleButton" TargetType="ToggleButt ...
- 《WPF》Expander控件简单美化
示例图: Expander控件功能很常见, 一般用于系统左侧的菜单收缩面板. 1.主要的组成 一个头部(header) 和 一个 内容(content) 组成. <Expander Expand ...
- 迟到的 WPF 学习 —— 控件
这一章书中内容比较多而杂,但每个对象的内容又相对简短,所以只挑选里边有代表性的内容做记录. 1. Label 控件:一个基础的简单的 ContentControl,Labe 支持快捷键文本的设置,可以 ...
- 在 UWP 中实现 Expander 控件
WPF 中的 Expander 控件在 Windows 10 SDK 中并不提供,本文主要说明,如何在 UWP 中创建这样一个控件.其效果如下图: 首先,分析该控件需要的一些特性,它应该至少包括如下三 ...
- WPF Popup 控件导致被遮挡内容不刷新的原因
WPF Popup 控件导致被遮挡内容不刷新的原因 周银辉 今天在写一个WPF控件时用到了Popup控件,很郁闷的情况是:当popup关闭时,原来被popup挡住的界面部分不刷新,非要手动刷新一下(比 ...
- 创建 WPF 工具箱控件
创建 WPF 工具箱控件 WPF (Windows Presentation Framework) 工具箱控件模板允许您创建 WPF 控件,会自动添加到 工具箱 安装扩展的安装. 本主题演示如何使用模 ...
随机推荐
- UVa 642 - Word Amalgamation
题目:给你一个单词列表.再给你一些新的单词.输出列表中又一次排列能得到此新单词的词. 分析:字符串.对每一个字符串的字母排序生成新的传f(str).总体排序,用二分来查找就可以. 说明:注意输出要满足 ...
- 读取到配置文件的C语言的接口实现
/********************************************************************* * Author : Samson * Date ...
- 深入剖析Android四大组件(一)——Activity生命周期具体解释
1.管理Activity的生命周期 不管是正在执行的Activity还是没有执行的Activity,它们都接受Android的框架管理,这使得Activity处于不同的生命周期. ①Activity的 ...
- powerdesigner 16.5 视图的显示
今天中午为了解说绘图.然后把toolbox跟object brower都关掉了,花了1个小时才找到toolbox 1.object brower显示 直接使用快捷键 ALT+0 2.toolbox(也 ...
- 用HttpCombiner来减少js和css的请问次数
HttpCombiner也不记得是谁写的了,功能是把多个js文件或css文件合并到一块,压缩一下一起发给客户端来优化网站. 用法是这样的: <script type="text/jav ...
- 解析Qt元对象系统(四) 属性系统(确实比较方便)
官方解释 我们在Qt源码中可以看到一个QObject的子类经常会用到一些Q_开头的宏,例如QMainWindow类开始部分代码是这样的: Q_PROPERTY(QSize iconSize READ ...
- [RK3288][Android6.0] U-boot 启动流程小结【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/52536093 Platform: RK3288OS: Android 6.0Version: ...
- 杂项:MIS(管理信息系统)
ylbtech-杂项:MIS(管理信息系统) 管理信息系统(Management Information System,简称MIS)是一个以人为主导,利用计算机硬件.软件.网络通信设备以及其他办公设备 ...
- LBS(定位)的使用
一.LBS(定位)的使用 1.使用框架Core Location 2.CLLocationManager (1)CoreLocation中使用CLLocationManager对象来做用户定位 (2) ...
- php的string编码类型
在php中字符编码转换我们一般会用到iconv与mb_convert_encoding进行操作,但是mb_convert_encoding在转换性能上比iconv要差很多哦.string iconv ...