zoukankan      html  css  js  c++  java
  • 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
        }
  • 相关阅读:
    [对对子队]会议记录4.10(Scrum Meeting 1)
    [对对子队]团队任务拆解Alpha
    [对对子队]功能规格说明书
    [对对子队]技术规格说明书
    团队项目选择
    团队作业第四次—项目系统设计与数据库设计
    团队作业第三次—项目需求分析
    团队作业第二次——团队Github实战训练
    团队作业第一次—团队展示和项目展示
    贡献分分配规则
  • 原文地址:https://www.cnblogs.com/quietwalk/p/3555461.html
Copyright © 2011-2022 走看看