Expender Header 与 Content互斥展示
Expender 在展开时,Header 不展示;不展开时,展示 Header


<Expander dxlc:DockLayoutControl.Dock="Top" IsExpanded="True" ExpandDirection="Down" Name="expender" >
<Expander.Header>
<dxlc:LayoutGroup Orientation="Horizontal"
Visibility="{Binding IsExpanded,
RelativeSource={RelativeSource AncestorType={x:Type Expander},
Mode=FindAncestor}, Converter={StaticResource BoolToVisibilityConverter}}">
<dxlc:LayoutItem Label="{DynamicResource ResourceKey=ResPatientEncounterId}">
<TextBlock Text="{Binding ElementName=tbEncounterId, Path=Text}"
TextWrapping="Wrap" FontSize="15" FontWeight="Bold"></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="{StaticResource ResourceKey=ResPatientName}">
<TextBlock MinWidth="200" Text="{Binding ElementName=tbPatientName, Path=Text}"
TextWrapping="Wrap" FontSize="15" FontWeight="Bold"></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem >
<TextBlock Name="tbAgeAndGender"
TextWrapping="Wrap" FontSize="15" FontWeight="Bold"></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="{DynamicResource ResourceKey=ResMRN}">
<TextBlock Text="{Binding ElementName=tbMRN, Path=Text}"
TextWrapping="Wrap" FontSize="15" FontWeight="Bold"></TextBlock>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</Expander.Header>
<dxlc:LayoutControl Orientation="Vertical" >
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutItem Label="{DynamicResource ResourceKey=ResPatientEncounterId}">
<TextBlock Name="tbEncounterId" ></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="{StaticResource ResourceKey=ResPatientName}">
<TextBlock Name="tbPatientName" MinWidth="200" TextWrapping="Wrap" ></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Name="liDateOfBirth" Label="{DynamicResource ResourceKey=ResDateOfBirthG}">
<TextBlock Name="tbDOB" TextWrapping="Wrap" ></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="{DynamicResource ResourceKey=ResAge}" Name="liAge">
<TextBlock Name="tbAge" ></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="{DynamicResource ResourceKey=ResGender}" Name="liGender">
<TextBlock Name="tbGender" ></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="{DynamicResource ResourceKey=ResMRN}">
<TextBlock Name="tbMRN" ></TextBlock>
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup Orientation="Horizontal">
<dxlc:LayoutItem Label="{DynamicResource ResourceKey=ResAppointmentDoctor}">
<TextBlock Name="tbAttending"></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="{DynamicResource ResAllergies}">
<TextBlock Name="tbAllergies"></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="{DynamicResource ResAdvancedDirective}">
<TextBlock Name="tbAdavncedDirctive"></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="{DynamicResource ResWt}">
<TextBlock Name="tbWt"></TextBlock>
</dxlc:LayoutItem>
<dxlc:LayoutItem Label="{DynamicResource ResResport}">
<TextBlock Name="tbReport"/>
</dxlc:LayoutItem>
<dxlc:LayoutItem >
</dxlc:LayoutItem>
</dxlc:LayoutGroup>
</dxlc:LayoutControl>
</Expander>
public class BoolToVisibilityConverter : IValueConverter
{
#region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if ((bool)value)
return Visibility.Collapsed;
return Visibility.Visible;
} public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if ((Visibility)value == Visibility.Visible)
return false;
return true;
} #endregion
}
Expender Header 与 Content互斥展示的更多相关文章
- WPF HeaderedContentControl两个内容属性 Header和Content
<Window x:Class="XamlTest.Window2" xmlns="http://schemas.microsoft.com/winf ...
- 常用代码之七:静态htm如何包含header.htm和footer.htm。
要实现这个有多种解决方案,比如asp, php, 服务器端技术,IFrame等,但本文所记录的仅限于用jQuery和纯htm的解决方案. <head> <title></ ...
- jquery特效(1)—点击展示与隐藏全文
下班了~~~我把今天整理的一个jquery小特效发一下,个人觉得比较简单,嗖嗖的就写出来了~~~ 下面先来看最终的动态效果: 一.来看一下主体框架程序: <!DOCTYPE html> & ...
- 【自编教材】16万8千字的HTML+CSS基础 适合从0到1-可收藏
[图片链接有点小问题,这几天更新,敬请期待!] 目 录 第一章HTML基础 1.1 HTML简介和发展史 1.1.1 什么是HTML 1.1.2 HTML的发展历程 1.1.3 web标准 1.2 开 ...
- jQuery Mobile入门
转:http://www.cnblogs.com/linjiqin/archive/2011/07/17/2108896.html 简介:jQuery Mobile框架可以轻松的帮助我们实现非常好看的 ...
- 多功能前台交互效果插件superSlide
平时我们常用的"焦点图/幻灯片""Tab标签切换""图片滚动""无缝滚动"等效果要加载n个插件,又害怕代码冲突又怕不兼容 ...
- JS SDK 随手笔记
JS SDK 随手笔记 窗口模块 Frame/Multi Frame 对话框 页面间的通讯 生命周期 窗口层叠 窗口模块 窗口模块是是AppCan移动应用界面最基本的单位.窗口是每个界面布局的基础,他 ...
- 据说年薪30万的Android程序员必须知道的帖子
Android中国开发精英 目前包括: Android开源项目第一篇--个性化控件(View)篇 包括ListView.ActionBar.Menu.ViewPager.Gallery.G ...
- Android开源项目分类汇总
目前包括: Android开源项目第一篇——个性化控件(View)篇 包括ListView.ActionBar.Menu.ViewPager.Gallery.GridView.ImageView. ...
随机推荐
- Android开源框架——Picasso
开篇——介绍Picasso (Picasso是什么?)Picasso:A Powerfull Image Downloading and Caching Library for Android,即An ...
- strace 监控所有php-fpm worker
strace命令详解 http://linux.die.net/man/1/strace strace -tt -T $(pidof 'php-fpm: pool www' | sed 's/\([ ...
- fgetc和fputc函数
1.输入函数 以下三个函数可用于一次读一个字符. #include <stdio.h> int getc( FILE *fp ); int fgetc( FILE *fp ); int g ...
- Python3学习(1)-基础篇
Python3学习(1)-基础篇 Python3学习(2)-中级篇 Python3学习(3)-高级篇 安装(MAC) 直接运行: brew install python3 输入:python3 --v ...
- alert()、confirm()和prompt()的区别
1.警告消息框alertalert 方法有一个参数,即希望对用户显示的文本字符串.该字符串不是 HTML 格式.该消息框提供了一个“确定”按钮让用户关闭该消息框,并且该消息框是模式对话框,也就是说,用 ...
- 鸟瞰Nodejs
一,基础. 1,Node的包管理器:npm; 安装node环境时会自动安装. 本地模式获取一个包:npm install [package_name] 此时包被安装到当前木的node_modules子 ...
- Orleans 高级特性-目录
这里将介绍一些Orleans的高级特性,适合对Orleans已经有不少了解的用户,先列出一个索引,博客文章慢慢补充 1.使用Immutable 优化复制 2.自定义序列化 (待完成) 3.可重入 Gr ...
- JS结构
当前页面的JS结构如下: <script> /* 这是立即执行的方法 */ (function () { /* 这是初始化表格 */ var init = fun ...
- mybatis乐观锁实现,解决并发问题
银行两操作员同时操作同一账户就是典型的例子.比如A.B操作员同时读取一余额为1000元的账户,A操作员为该账户增加100元,B操作员同时为该账户扣除50元,A先提交,B后提交.最后实际账户余额为100 ...
- SQL——神奇代码1之Update
说明:一个带有update的循环的代码.很简单,但是在QQ群里问了,应该说是很少有人注意这个问题,也就是很少有人真的理解SQL中的Update. 代码如下: if object_id('tempdb. ...