继续聊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>
转载于:https://www.cnblogs.com/xieweikai/p/6832754.html
继续聊WPF——Expander控件(1)相关推荐
- WPF Expander控件简单样式
WPF Expander控件简单样式 样式代码: <Style x:Key="ExpanderStyle1" TargetType="{x:Type Expande ...
- WPF Expander控件使用
WPF Expander控件使用 xaml代码: <Window x:Class="WpfApp5.MainWindow"xmlns="http://schemas ...
- WPF——Expander控件(转)
Expander是一个可以展开和折叠的控件,它包含两部分标头和内容. 标头通Header属性来设置,内容通过Conent属性设置,如下面一个简单的例子: Expander ExpandDirectio ...
- 继续聊WPF——Slider控件
Slider控件,讲行通俗一点就是我们很常见的滑块,控件的外观上显示一系例刻度值,并存在一个可以被拖动的滑块,用户可以通过拖动滑块来控制控件的值. 如下图所示,是Windows系统的音量调节滑块. 下 ...
- slider wpf 垂直_继续聊WPF——Slider控件
下面看一个Tick控件的例子,这只是演示,Tick单独使用没有意义. Minimum="0" Fill="DarkMagenta" Placement=&quo ...
- C# wpf Expander控件的简单应用(7)
测试 可以通过ExpandDirection属性可控制其展开方向.
- expander菜单控件_《WPF》Expander控件简单美化
示例图: Expander控件功能很常见, 一般用于系统左侧的菜单收缩面板. 1.主要的组成 一个头部(header) 和 一个 内容(content) 组成. 控制中心 资源管理 仪表菜单 顶部导航 ...
- WPF 控件专题 Expander控件详解
1.Expander介绍 Expander控件显示具有可折叠内容显示窗口的标题.是一个可以展开和折叠的控件,它包含两部分--标头和内容. 控件不会自动提供 Expander 滚动功能:如果展开窗口的内 ...
- 2021-08-11 WPF控件专题 Expander 控件详解
1.Expander 控件介绍 折叠控件 GroupBox 带标题 HeaderedContentControl 折叠或展开的特点,IsExpand 是否显示内容,默认False (隐藏的) Expa ...
- 2021-08-19 WPF控件专题 Expander 控件详解
1.Expander 控件介绍 折叠控件 GroupBox 带标题 HeaderedContentControl 折叠或展开的特点,IsExpand 是否显示内容,默认False (隐藏的) Expa ...
最新文章
- MongoDB的安装及基本命令和pymongo的使用
- centos cmake安装mysql_Centos安装mysql实例教程
- 小程序支付成功后跳转页面失败
- 阿里巴巴右侧6滑块VS雅虎右侧6滑块VS自定义6滑块
- linus系统下载_系统管理程序卷土重来,Linus拒绝并阅读电子邮件,以及更多行业趋势
- 多浏览器判断,切换及使用
- 组策略:交互式登录:不显示最后的用户名
- 2021想学UI设计,你必需要知道这些
- c语言界面飞机图形代码,求个用最简单的的代码来实现图形界面…
- 《大道至简》第一章读后感(java伪代码)
- 如何布局电子商务网站
- rust相框加载图片代码_vue图片加载与显示默认图片实例代码
- 无法查看别的计算机,雨林木风win7网上邻居看不到别的电脑的解决教程
- ubuntu20安装gcc_Ubuntu:软件常用安装方法(附WPS安装)
- 计算机类综合素质测评考什么,综合素质测试考什么内容
- 数组——二维数组及字符串
- 工业控制计算机系统总线,工业控制计算机总线技术.ppt
- 干货:Hulu教你赴美工作怎么拿签证!
- [chat-GPT]解决OpenAI‘s services are not available in your country问题
- java layout组件居中_Android 布局中 如何使控件居中
热门文章
- libx264.c:function X264_init: error: undefined reference to x264_encoder_open_142
- LINUX下载编译libvpx
- 编译问题解决:mkdir: 无法创建目录/usr/local/share/man/man1: 文件已存在
- 热烈祝贺排名进入前1000
- 小腿抽筋了,按摩承山穴,外加念观世音菩萨是不是迷信
- 检验成果的软指标与硬指标
- 一个简单进程池的实现
- 包打包和解析过程 unity_Unity AssetBundle 解析 (一)AB包介绍与构建
- 以弹窗形式打开页面_“弹窗广告”肆意而为!扰民?还可能侵权!
- logstash对nginx日志进行解析