| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590 |
- <Application x:Class="ivf_tl_Operate.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:ivf_tl_Operate"
- xmlns:converter="clr-namespace:ivf_tl_Operate.Converts"
- xmlns:sys="clr-namespace:System;assembly=mscorlib"
- StartupUri="MainWindow.xaml">
- <Application.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Colors.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Effects.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Brushes.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/Geometrys.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/ConstProperty.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Resources/BaseStyleResource.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/Others/OtherResource.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/Blocks/BlocksResource.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/Buttons/ButtonResource.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/ScrollViewers/ScrollViewerResource.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/ListBoxs/ListBoxResource.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/ComboBoxs/ComboBoxResource.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/WpfControlLibrary;component/Controls/DatePickers/DatePickerResource.xaml"/>
- <ResourceDictionary Source="pack://application:,,,/ivf_tl_Operate;component/Resources/Language/Chinese.xaml"/>
- <!--<ResourceDictionary Source="pack://application:,,,/ivf_tl_Operate;component/Resources/Language/English.xaml"/>-->
- <!-- M4-01-4:自适应竖屏改造规约(三段式根模板/星号比例/触控基准 TouchMinSize),供主页+13子页复用。 -->
- <ResourceDictionary Source="pack://application:,,,/ivf_tl_Operate;component/Resources/AdaptiveStyles.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- <converter:HouseDoorStateConvert x:Key="HouseDoorStateConvert" />
- <converter:IntToBoolConverter x:Key="IntToBoolConverter" />
- <converter:HouseInfoBackgroundConvert1 x:Key="HouseInfoBackgroundConvert1" />
- <converter:HouseInfoBackgroundConvert x:Key="HouseInfoBackgroundConvert" />
- <converter:ConvertButtonIsEnable x:Key="ConvertButtonIsEnable" />
- <converter:PicImageSourceConverter x:Key="PicImageSourceConverter" />
- <converter:Int0ToCollapsedConvert x:Key="Int0ToCollapsedConvert" />
- <LinearGradientBrush x:Key="BannerTopFill" StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Color="#F8F9FA" Offset="0.95" />
- <GradientStop Color="#D5DBDC" Offset="1" />
- </LinearGradientBrush>
- <LinearGradientBrush x:Key="BorderStageFill" StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Color="#F5F6F8" Offset="0.995" />
- <GradientStop Color="#D5DBDC" Offset="1" />
- </LinearGradientBrush>
-
- <LinearGradientBrush x:Key="BorderMenuFill" StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Color="#F5F6F8" Offset="1" />
- <GradientStop Color="#D0D5D8" Offset="1" />
- </LinearGradientBrush>
- <LinearGradientBrush x:Key="BuleLinear" StartPoint="0.5,0" EndPoint="0.5,1">
- <GradientStop Color="#3A5F91" Offset="0" />
- <GradientStop Color="#6B93C9" Offset="1" />
- </LinearGradientBrush>
-
- <SolidColorBrush x:Key="VoiceOpenBrush" Color="#7278FB" />
- <!--VoiceOpen-->
- <PathFigureCollection x:Key="VoiceOpenPath">
- M901.546667 746.012444l-48.440889-25.6A409.799111 409.799111 0 0 0 910.222222 511.544889c0-79.445333-22.698667-153.315556-61.354666-215.950222l47.758222-26.595556a452.152889 452.152889 0 0 1 4.920889 476.984889z m-199.082667-105.244444A241.777778 241.777778 0 0 0 739.555556 511.544889a241.976889 241.976889 0 0 0-39.509334-133.12l47.445334-26.396445A282.936889 282.936889 0 0 1 796.444444 511.573333a282.794667 282.794667 0 0 1-45.880888 154.595556l-48.099556-25.429333z m-160.568889 253.582222L213.333333 653.852444H113.777778c-31.402667 0-56.888889-24.746667-56.888889-56.376888v-171.804445c0-31.630222 25.486222-56.405333 56.888889-56.405333h99.555555l328.561778-240.469334C572.16 103.310222 597.333333 106.467556 597.333333 167.936v687.274667c0 61.468444-25.173333 64.625778-55.438222 39.139555z
- </PathFigureCollection>
- <DrawingImage x:Key="VoiceOpenImage">
- <DrawingImage.Drawing>
- <GeometryDrawing Brush="{ StaticResource VoiceOpenBrush}">
- <GeometryDrawing.Geometry>
- <PathGeometry FillRule="EvenOdd" Figures="{StaticResource VoiceOpenPath}" />
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingImage.Drawing>
- </DrawingImage>
- <!--Brush-->
- <SolidColorBrush x:Key="VoiceCloseBrush" Color="#7278FB" />
- <!--VoiceClose-->
- <PathFigureCollection x:Key="VoiceClosePath">
- M865.109333 511.573333l90.510223 90.510223a14.193778 14.193778 0 0 1 0 20.110222l-20.110223 20.110222a14.222222 14.222222 0 0 1-20.110222 0L824.888889 551.822222l-90.510222 90.510222a14.222222 14.222222 0 0 1-20.110223 0l-20.110222-20.110222a14.222222 14.222222 0 0 1 0-20.110222l90.510222-90.510222-90.510222-90.510222a14.222222 14.222222 0 0 1 0-20.110223l20.110222-20.110222a14.193778 14.193778 0 0 1 20.110223 0L824.888889 471.352889l90.510222-90.510222a14.193778 14.193778 0 0 1 20.110222 0l20.110223 20.110222a14.193778 14.193778 0 0 1 0 20.110222l-90.510223 90.510222zM541.895111 894.350222L213.333333 653.852444H113.777778c-31.431111 0-56.888889-24.746667-56.888889-56.376888v-171.804445a56.32 56.32 0 0 1 56.888889-56.405333h99.555555l328.561778-240.469334C572.16 103.310222 597.333333 106.467556 597.333333 167.936v687.274667c0 61.468444-25.173333 64.625778-55.438222 39.139555z
- </PathFigureCollection>
- <DrawingImage x:Key="VoiceCloseImage">
- <DrawingImage.Drawing>
- <GeometryDrawing Brush="{ StaticResource VoiceCloseBrush}">
- <GeometryDrawing.Geometry>
- <PathGeometry FillRule="EvenOdd" Figures="{StaticResource VoiceClosePath}" />
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingImage.Drawing>
- </DrawingImage>
- <!--#region 滚动条 -->
- <Style x:Key="ScrollBarTrackButtonNew" TargetType="{x:Type RepeatButton}">
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RepeatButton}">
- <Border Background="Transparent"/>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <ControlTemplate x:Key="ThumbTemplateNew" TargetType="Thumb">
- <Grid>
- <Border x:Name="Bg" CornerRadius="10" Margin="1" SnapsToDevicePixels="True" Background="#C6C6C6"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="#C6C6C6" TargetName="Bg"></Setter>
- </Trigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Opacity" Value="0.5" TargetName="Bg"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <ControlTemplate x:Key="VerticalScrollBarNew" TargetType="{x:Type ScrollBar}">
- <Grid x:Name="VerticalRoot" Height="{TemplateBinding Height}">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <!--外部背景,好像不用更好看-->
- <!--<Border x:Name="Bg" Grid.Row="0" Grid.RowSpan="3" CornerRadius="0" Opacity="0" Background="#858585"/>-->
- <!--内部背景-->
- <Border x:Name="BgInner" Grid.Row="1" Margin="0" CornerRadius="3" SnapsToDevicePixels ="True" Opacity="0.3" Background="Transparent"/>
- <!--上按钮-->
- <!--<Border Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="VerticalSmallDecrease">
- <RepeatButton local:ControlAttachProperty.FIcon="" Style="{StaticResource ScrollBarButton}"
- IsTabStop="False" Interval="50" Margin="0" Command="ScrollBar.LineUpCommand"/>
- </Border>-->
- <!--中间滑动区域-->
- <Track x:Name="PART_Track" IsDirectionReversed="True" Grid.Row="1">
- <Track.Resources>
- <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">
- 100
- </sys:Double>
- </Track.Resources>
- <!--上滑块-->
- <Track.DecreaseRepeatButton>
- <RepeatButton x:Name="HorizontalLargeDecrease" Command="ScrollBar.PageUpCommand"
- IsTabStop="False" Interval="50" Style="{DynamicResource ScrollBarTrackButtonNew}" />
- </Track.DecreaseRepeatButton>
- <!--中间滑块-->
- <Track.Thumb>
- <Thumb Template="{StaticResource ThumbTemplateNew}" />
- </Track.Thumb>
- <!--下滑块-->
- <Track.IncreaseRepeatButton>
- <RepeatButton x:Name="HorizontalLargeIncrease" Command="ScrollBar.PageDownCommand" IsTabStop="False" Interval="50" Style="{DynamicResource ScrollBarTrackButton}" />
- </Track.IncreaseRepeatButton>
- </Track>
- <!--下按钮-->
- <!--<Border Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="VerticalSmallIncrease">
- <RepeatButton local:ControlAttachProperty.FIcon="" Style="{StaticResource ScrollBarButton}"
- IsTabStop="False" Interval="50" Margin="0" Command="ScrollBar.LineDownCommand"/>
- </Border>-->
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="BgInner" Property="Opacity" Value="0.5"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <ControlTemplate x:Key="HorizontalScrollBarNew" TargetType="{x:Type ScrollBar}">
- <Grid x:Name="HorizontalRoot" Height="{TemplateBinding Height}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <!--外部背景,好像不用更好看-->
- <!--<Border x:Name="Bg" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="0" Opacity="0" Background="#858585"/>-->
- <!--<Border x:Name="Bg" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="0" Opacity="1" Background="Red"/>-->
- <!--内部背景-->
- <!--<Border x:Name="BgInner" Grid.Column="1" Margin="0" SnapsToDevicePixels="True" Opacity="0" CornerRadius="6" Background="Red"/>-->
- <!--左按钮-->
- <!--<Border Visibility="Collapsed" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center">
- <RepeatButton Style="{StaticResource ScrollBarButton}" x:Name="HorizontalSmallDecrease"
- IsTabStop="False" Interval="50" Margin="0,1,0,0" Command="ScrollBar.LineLeftCommand"/>
- </Border>-->
- <!--中间滑动区域-->
- <Track x:Name="PART_Track" IsDirectionReversed="False" Grid.Column="1">
- <!--左滑块-->
- <Track.DecreaseRepeatButton>
- <RepeatButton x:Name="HorizontalLargeDecrease" Command="ScrollBar.PageLeftCommand"
- IsTabStop="False" Interval="50" Style="{DynamicResource ScrollBarTrackButtonNew}" />
- </Track.DecreaseRepeatButton>
- <!--中间滑块 Margin="1" VerticalAlignment="Center" VerticalContentAlignment="Center" -->
- <Track.Thumb>
- <Thumb Template="{StaticResource ThumbTemplateNew}" />
- </Track.Thumb>
- <!--右滑块-->
- <Track.IncreaseRepeatButton>
- <RepeatButton x:Name="HorizontalLargeIncrease" Command="ScrollBar.PageRightCommand"
- IsTabStop="False" Interval="50" Style="{DynamicResource ScrollBarTrackButtonNew}" />
- </Track.IncreaseRepeatButton>
- </Track>
- <!--右按钮-->
- <!--<Border Grid.Column="2" Visibility="Collapsed" VerticalAlignment="Center" HorizontalAlignment="Center">
- <RepeatButton Style="{StaticResource ScrollBarButton}"
- IsTabStop="False" Interval="50" Margin="0,1,0,0" Command="ScrollBar.LineRightCommand"/>
- </Border>-->
- </Grid>
- <!--<ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="BgInner" Property="Opacity" Value="0.5"/>
- </Trigger>
- </ControlTemplate.Triggers>-->
- </ControlTemplate>
- <Style x:Key="DefaultScrollBar1" TargetType="{x:Type ScrollBar}">
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="OverridesDefaultStyle" Value="true" />
- <Style.Triggers>
- <Trigger Property="Orientation" Value="Horizontal">
- <Setter Property="Template" Value="{StaticResource HorizontalScrollBarNew}" />
- <Setter Property="Height" Value="6" />
- </Trigger>
- <Trigger Property="Orientation" Value="Vertical">
- <Setter Property="Template" Value="{StaticResource VerticalScrollBarNew}" />
- <Setter Property="Width" Value="40" />
- </Trigger>
- </Style.Triggers>
- </Style>
- <Style x:Key="DefaultScrollViewer1" TargetType="{x:Type ScrollViewer }" >
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ScrollViewer}">
- <Grid x:Name="Grid" Background="{TemplateBinding Background}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" x:Name="leftColumn" />
- <ColumnDefinition Width="Auto" x:Name="rightColumn" />
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}"
- CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}"
- Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}"
- Grid.Row="0" Grid.Column="0" />
- <!--垂直滚动条 -->
- <ScrollBar Style="{StaticResource DefaultScrollBar1}" x:Name="PART_VerticalScrollBar"
- AutomationProperties.AutomationId="VerticalScrollBar"
- ViewportSize="{TemplateBinding ViewportHeight}"
- Cursor="Arrow" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}"
- Orientation="Vertical" Grid.Row="0" Grid.Column="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
- Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- <Style x:Key="SettingWindowBorderStyle" TargetType="{x:Type Border}">
- <Style.Setters>
- <Setter Property="BorderThickness" Value="0 1 0 1" />
- <Setter Property="BorderBrush" Value="#D0CFD4" />
- <Setter Property="Height" Value="150" />
- </Style.Setters>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="LightGray" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="False">
- <Setter Property="Background" Value="White" />
- </Trigger>
- <!--<EventTrigger RoutedEvent="Border.MouseDown">
- <BeginStoryboard>
- <Storyboard>
- <ColorAnimation From="LightGray" To="White" Duration="00:00:01" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" />
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger>-->
- </Style.Triggers>
- </Style>
-
-
- <Style x:Key="FocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <LinearGradientBrush x:Key="ComboBox.Static.Background" EndPoint="0,1" StartPoint="0,0">
- <GradientStop Color="#FFF0F0F0" Offset="0.0"/>
- <GradientStop Color="#FFE5E5E5" Offset="1.0"/>
- </LinearGradientBrush>
- <VisualBrush x:Key="HelpBrush" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
- <VisualBrush.Visual>
- <!--<TextBlock FontStyle="Italic" FontSize="30" Text="请输入密码" />-->
- <TextBlock FontStyle="Italic" FontSize="30" Text="{DynamicResource C0043}" />
- </VisualBrush.Visual>
- </VisualBrush>
- <VisualBrush x:Key="HelpBrush1" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center">
- <VisualBrush.Visual>
- <TextBlock FontSize="24" Text="{DynamicResource C0290}" />
- </VisualBrush.Visual>
- </VisualBrush>
- <VisualBrush x:Key="HelpBrush2" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
- <VisualBrush.Visual>
- <TextBlock FontStyle="Italic" FontSize="24" Text="{DynamicResource C0108}" />
- </VisualBrush.Visual>
- </VisualBrush>
- <VisualBrush x:Key="HelpBrush3" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
- <VisualBrush.Visual>
- <TextBlock FontStyle="Italic" FontSize="24" Text="{DynamicResource C0109}" />
- </VisualBrush.Visual>
- </VisualBrush>
- <SolidColorBrush x:Key="TextBox.Static.Background" Color="#FFFFFFFF"/>
- <!--ToggleButton样式,可编辑与不可编辑通用-->
- <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="IsTabStop" Value="false"/>
- <Setter Property="Focusable" Value="false"/>
- <Setter Property="ClickMode" Value="Press"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Border x:Name="templateRoot" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
- <Border x:Name="splitBorder" BorderThickness="0" HorizontalAlignment="Right" SnapsToDevicePixels="true" Width="54">
- <!--<Rectangle x:Name="rec1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="40" Height="40" Fill="Black"/>-->
- <Image x:Name="image1" Width="44" Height="44" Source="pack://application:,,,/ivf_tl_Operate;component/Resources/Image/PullDownGrayIcon.png" HorizontalAlignment="Right" VerticalAlignment="Center"/>
- <!--<Path x:Name="arrow" Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" Fill="{StaticResource ComboBox.Static.Glyph}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"/>-->
- </Border>
- </Border>
- <ControlTemplate.Triggers>
- <!--<Trigger Property="IsChecked" Value="True">
- <Setter TargetName="image1" Property="Source" Value="/Resources/Image/foldScore.png"/>
- <Setter TargetName="image1" Property="Width" Value="30"/>
- <Setter TargetName="image1" Property="Height" Value="14"/>
- </Trigger>-->
- <!--<MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="false"/>
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="false"/>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="true"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="red"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Border}"/>
- <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Background}"/>
- <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Border}"/>
- </MultiDataTrigger>-->
- <!--<Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.MouseOver.Glyph}"/>
- </Trigger>-->
- <!--<MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Background}"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Border}"/>
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Background}"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Border}"/>
- <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}"/>
- <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}"/>
- </MultiDataTrigger>-->
- <!--<Trigger Property="IsPressed" Value="true">
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}"/>
- </Trigger>-->
- <!--<MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="blue"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Border}"/>
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Self}}" Value="true"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="red"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Border}"/>
- <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}"/>
- <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}"/>
- </MultiDataTrigger>
- -->
- <!--<Trigger Property="IsEnabled" Value="false">
- <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}"/>
- </Trigger>-->
- <!--
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="red"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Border}"/>
- </MultiDataTrigger>
- <MultiDataTrigger>
- <MultiDataTrigger.Conditions>
- <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="false"/>
- <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
- </MultiDataTrigger.Conditions>
- <Setter Property="Background" TargetName="templateRoot" Value="red"/>
- <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Editable.Border}"/>
- <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Background}"/>
- <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Disabled.Editable.Button.Border}"/>
- </MultiDataTrigger>-->
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--不可编辑时Combox控件样式-->
- <ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
- <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
- <Popup x:Name="PART_Popup" AllowsTransparency="true" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" VerticalOffset="1" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}" Placement="Bottom">
- <Border >
- <ScrollViewer
- PanningMode="Both" Width="{Binding Path=ActualWidth, ElementName=templateRoot}" Background="{TemplateBinding Background}" x:Name="DropDownScrollViewer" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden">
- <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </ScrollViewer>
- </Border>
- </Popup>
- <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
- <ContentPresenter x:Name="contentPresenter" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Grid>
- <ControlTemplate.Triggers>
- <!--<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
- <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
- <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
- </Trigger>-->
- <Trigger Property="HasItems" Value="false">
- <Setter Property="MaxHeight" TargetName="PART_Popup" Value="60"/>
- </Trigger>
- <Trigger Property="HasItems" Value="true">
- <Setter Property="MaxHeight" TargetName="PART_Popup" Value="330"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsGrouping" Value="true"/>
- <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
- </MultiTrigger.Conditions>
- <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
- </MultiTrigger>
- <!--<Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
- <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
- <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
- </Trigger>-->
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <!--可编辑时Combox控件样式-->
- <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
- <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
- </Grid.ColumnDefinitions>
- <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
- <Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
- <ScrollViewer x:Name="DropDownScrollViewer">
- <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
- <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
- <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
- </Canvas>
- <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
- </Grid>
- </ScrollViewer>
- </Border>
- <!--<theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
-
- </theme:SystemDropShadowChrome>-->
- </Popup>
- <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
- <Border x:Name="border" Background="{StaticResource TextBox.Static.Background}" Margin="{TemplateBinding BorderThickness}">
- <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Opacity" TargetName="border" Value="0.56"/>
- </Trigger>
- <Trigger Property="IsKeyboardFocusWithin" Value="true">
- <Setter Property="Foreground" Value="Black"/>
- </Trigger>
- <!--<Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
- <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
- <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
- </Trigger>-->
- <Trigger Property="HasItems" Value="false">
- <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsGrouping" Value="true"/>
- <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
- </MultiTrigger.Conditions>
- <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
- </MultiTrigger>
- <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
- <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
- <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- <Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
- <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
- <Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
- <Setter Property="BorderBrush" Value="Red"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
- <Setter Property="BorderThickness" Value="10"/>
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
- <Setter Property="Padding" Value="10 0 3 0"/>
- <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
- <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
- <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
- <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
- <!--<Style.Triggers>
- <Trigger Property="IsEditable" Value="true">
- <Setter Property="IsTabStop" Value="false"/>
- <Setter Property="Padding" Value="2"/>
- <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
- </Trigger>
- </Style.Triggers>-->
- </Style>
-
- <Style x:Key="ComboBoxItemContainerStyle1" TargetType="{x:Type ComboBoxItem}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ComboBoxItem}">
- <Border Height="66" Background="Transparent" x:Name="Bd" SnapsToDevicePixels="true" BorderBrush="#707070" BorderThickness="1 1 1 1">
- <ContentPresenter Margin="10 0 0 0" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter TargetName="Bd" Property="Background" Value="#CECECE"/>
- </Trigger>
- <!--<Trigger Property="IsTouchCapturedWithin" Value="True">
- <Setter Property="IsSelected" Value="False"/>
- </Trigger>-->
- <!--<Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="Bd" Property="Background" Value="Blue"/>
- </Trigger>-->
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- </ResourceDictionary>
- </Application.Resources>
- </Application>
|