拍单功能继续优化
This commit is contained in:
1 parent
29042424dc
commit
34c51c6fcd
64 files changed
+7138
-305
No files matched your search
@@ -297,13 +297,84 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Style x:Key="RoundedComboBox" TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="Width" Value="auto"></Setter>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"></Setter>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource pageColorBrush}"></Setter>
|
||||
<Setter Property="BorderThickness" Value="1"></Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBox}">
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="4" Background="Transparent">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="auto"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--下拉箭头-->
|
||||
<ToggleButton Grid.Column="1" ClickMode="Press" Focusable="False" Cursor="Hand"
|
||||
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
Margin="2" MinWidth="0" MinHeight="0" Width="Auto">
|
||||
<ToggleButton.Style>
|
||||
<Style TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="MinWidth" Value="0"/>
|
||||
<Setter Property="MinHeight" Value="0"/>
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="Height" Value="Auto"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="#00000000"/>
|
||||
<Setter Property="BorderThickness" Value="2"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<DockPanel Background="{TemplateBinding Background}" LastChildFill="False" SnapsToDevicePixels="True">
|
||||
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" DockPanel.Dock="Right" >
|
||||
<Path Data="M0,0L3.5,4 7,0z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</DockPanel>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True"></Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ToggleButton.Style>
|
||||
</ToggleButton>
|
||||
<!--项内容-->
|
||||
<ContentPresenter IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" VerticalAlignment="Center" Margin="3" HorizontalAlignment="Stretch" />
|
||||
<TextBox x:Name="PART_EditableTextBox" HorizontalAlignment="Stretch" Focusable="True" Visibility="Collapsed" IsReadOnly="False"/>
|
||||
<!--下拉显示面板HorizontalOffset:设置下拉面板的相对位置-->
|
||||
<Popup HorizontalOffset="-1" Width="{TemplateBinding ActualWidth}"
|
||||
IsOpen="{TemplateBinding IsDropDownOpen}" Focusable="False" PopupAnimation="Slide">
|
||||
<Grid SnapsToDevicePixels="True" HorizontalAlignment="Stretch">
|
||||
<Border BorderThickness="1,1,1,1" BorderBrush="{TemplateBinding BorderBrush}" HorizontalAlignment="Stretch" CornerRadius="0">
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="White" />
|
||||
</Border.Background>
|
||||
</Border>
|
||||
<ScrollViewer SnapsToDevicePixels="True" HorizontalAlignment="Stretch" >
|
||||
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" HorizontalAlignment="Stretch" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
|
||||
<ControlTemplate x:Key="ComboBoxTemplate1" TargetType="{x:Type ComboBox}">
|
||||
<Border BorderBrush="Black" BorderThickness="1">
|
||||
<ToggleButton x:Name="toggleButton" ClickMode="Press">
|
||||
|
||||
Reference in new issue
Block a user