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
}

最新文章

  1. Skyshop: Image-Based Lighting Tools &amp; Shaders插件调整反射光不明显的模型
  2. 工作流引擎Oozie(二):coordinator
  3. iOS开发UI篇—CALayer简介
  4. 用Nginx+Lua(OpenResty)开发高性能Web应用
  5. [Tex学习笔记]矩阵输入中的省略号
  6. centos最小安装,之后想安装x-windows,安装图形界面 startx
  7. android:configChanges属性
  8. TcxDBVerticalGrid优秀的编辑控件
  9. Let&#39;s Encrypt+Apache+Tomcat实现免费HTTPS
  10. JavaEE Tutorials (22) - 事务
  11. jpush 延迟推送的栗子
  12. Struts2-在js中使用struts2标签
  13. 由源代码编译SpriteBuilder最新版本1.5.0搭配最新的Cocos2D 3.4.9
  14. idea构建spark开发环境,并本地运行wordcount
  15. Java框架spring Boot学习笔记(七):@Configuration,@bean注解
  16. 三方面搞定http协议之“请求方法”
  17. js网页下载csv格式的表格
  18. P1494 [国家集训队]小Z的袜子(莫队算法)
  19. BeanShell用法(摘抄至网络)
  20. hadoop web管理界面不能打开问题

热门文章

  1. 学习python之练习(一)
  2. win8 下 IIS APPPOOL\DefaultAppPool 登录失败的解决方法
  3. Bank homework 10 2016 4 25
  4. 【kd-tree】bzoj4154 [Ipsc2015]Generating Synergy
  5. LVS三种模式配置及优点缺点比较
  6. Git 常用几个操作
  7. UART的CTS与RTS
  8. C语言 线性表 顺序表结构 实现
  9. Color颜色对照表
  10. javascript和C#比较