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互斥展示的更多相关文章

  1. WPF HeaderedContentControl两个内容属性 Header和Content

    <Window x:Class="XamlTest.Window2"        xmlns="http://schemas.microsoft.com/winf ...

  2. 常用代码之七:静态htm如何包含header.htm和footer.htm。

    要实现这个有多种解决方案,比如asp, php, 服务器端技术,IFrame等,但本文所记录的仅限于用jQuery和纯htm的解决方案. <head> <title></ ...

  3. jquery特效(1)—点击展示与隐藏全文

    下班了~~~我把今天整理的一个jquery小特效发一下,个人觉得比较简单,嗖嗖的就写出来了~~~ 下面先来看最终的动态效果: 一.来看一下主体框架程序: <!DOCTYPE html> & ...

  4. 【自编教材】16万8千字的HTML+CSS基础 适合从0到1-可收藏

    [图片链接有点小问题,这几天更新,敬请期待!] 目 录 第一章HTML基础 1.1 HTML简介和发展史 1.1.1 什么是HTML 1.1.2 HTML的发展历程 1.1.3 web标准 1.2 开 ...

  5. jQuery Mobile入门

    转:http://www.cnblogs.com/linjiqin/archive/2011/07/17/2108896.html 简介:jQuery Mobile框架可以轻松的帮助我们实现非常好看的 ...

  6. 多功能前台交互效果插件superSlide

    平时我们常用的"焦点图/幻灯片""Tab标签切换""图片滚动""无缝滚动"等效果要加载n个插件,又害怕代码冲突又怕不兼容 ...

  7. JS SDK 随手笔记

    JS SDK 随手笔记 窗口模块 Frame/Multi Frame 对话框 页面间的通讯 生命周期 窗口层叠 窗口模块 窗口模块是是AppCan移动应用界面最基本的单位.窗口是每个界面布局的基础,他 ...

  8. 据说年薪30万的Android程序员必须知道的帖子

    Android中国开发精英 目前包括: Android开源项目第一篇--个性化控件(View)篇       包括ListView.ActionBar.Menu.ViewPager.Gallery.G ...

  9. Android开源项目分类汇总

    目前包括: Android开源项目第一篇——个性化控件(View)篇   包括ListView.ActionBar.Menu.ViewPager.Gallery.GridView.ImageView. ...

随机推荐

  1. 【java】:生成excel

    //生成报表公用方法 //excelName: 生成的文件名 //list:时间/日期/描述 //listSelectFiled:  标题 //showContent :  文件内容bean //生成 ...

  2. C复数的四则运算

    #include<stdio.h> void judge(int True,int Fake) {     if (True == 0)     {         if (Fake == ...

  3. MYSQL 查询出最大/最小值所在的记录

    基本上都知道用MAX()/MIN()来求出所需的最大/最小值,但是只能查出那个最值的字段,而想查出整条记录或是对应的其他值却不行(SELECT MAX(grade), name FROM test;- ...

  4. Subsets 子集系列问题 leetcode

    子集系列问题: Coding 问题中有时会出现这样的问题:给定一个集合,求出这个集合所有的子集(所谓子集,就是包含原集合中的一部分元素的集合). 或者求出满足一定要求的子集,比如子集中元素总和为定值, ...

  5. NSMutableAttributedString/NSAttributedString 富文本设置

    今天在做项目的过程中,我们的设计师想要一种字体四周都带阴影的效果,但是我们平时使用的setShadowColor 和setShadowOffset是达不到这种效果,setShadowOffset 只能 ...

  6. linux-3重置root密码

    1.首先确认是redhat7 [root@localhost /]# cat /etc/redhat-release 详细步骤: 第1步:开机后在内核上敲击"e". 第2步:在li ...

  7. 根据Url 获取图片尺寸 iOS

    // 根据图片url获取图片尺寸 +(CGSize)getImageSizeWithURL:(id)imageURL {     NSURL* URL = nil;     if([imageURL ...

  8. IOS, xib和storyboard的混用

    1. 从xib的viewcontroll中启动storyboard 或者 从一个storyboard切换到另一个storyboard: [objc]– (IBAction)openStoryboard ...

  9. Sql语句,先查询再插入一条语句完成。

    if ( (select COUNT(*) from Hr where 考勤号码 = '149' and 日期时间 = '2015/7/3 12:00:26') = 0 )INSERT  INTO [ ...

  10. ReactiveCocoa 5.0 初窥:可能是最痛的一次升级

    RAC 5.0 相比于 4.0 有了巨大的变化,不仅是受 swift 3.0 大升级的影响,RAC 对自身项目结构的也进行了大幅度的调整.这个调整就是将 RAC 拆分为四个库:ReactiveCoco ...