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. 图片大小的模式UIViewContentMode

  2. [Leetcode][JAVA] Word Ladder II

    Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from ...

  3. 导航VC的左右item代码

    代码控制左右item: UIButton *btnCancel = [UIButton buttonWithType:UIButtonTypeCustom];     btnCancel.frame= ...

  4. JQuery学习(选择器-简单-animated)

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"% ...

  5. ASP.NET MVC学习之模型模板篇

    一.前言 如果你使用ASP.NET MVC制作后台一定会爱上它的EditorForModal.DisplayForModal和LabelForModal方法,因为这些方法可以将模型直接变成对应的标签, ...

  6. ASP.NET Web API 2 中的特性路由

    ASP.NET MVC 5.1 开始已经支持基于特性的路由(http://attributerouting.net),ASP.NET WEB API 2 同时也支持了这一特性. 启用特性路 由只需要在 ...

  7. vim和tmux主题颜色不一致问题

        没开tmux时使用vim 以及 开了tmux后使用vim 主题颜色不一致.随便打开一个.py文件,发现着色较深,非常影响阅读.   开始在.tmux.conf 中设置set -g defaul ...

  8. [游戏学习27] MFC 匀速运动

    >_<:理解上一个时间函数的概念和用法,本节的实现也比较简单 >_<:就是简单的绘图+时间函数 >_<:TicTac.h #define EX 1 //该点左鼠标 ...

  9. 由Java中toString()方法引发的无意识的递归想到的

    先看一段很简单的java代码: toString()/** * @author jeffwong */ public class InfiniteRecursion { public String t ...

  10. AngularJS快速入门指南04:指令

    AngularJS通过指令将HTML属性进行了扩展. AngularJS指令 AngularJS指令是带有ng-前缀的扩展HTML属性. ng-app指令用来初始化AngularJS applicat ...