1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <UserControl x:Class="PDF_Master.CustomControl.CommonWritableComboBox"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:PDF_Master.CustomControl"
- mc:Ignorable="d"
- d:DesignHeight="32" d:DesignWidth="66">
- <UserControl.Resources>
- <Style x:Key="PagesView_txtContext" TargetType="{x:Type TextBox}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
- Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
- <ScrollViewer x:Name="PART_ContentHost"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
-
- <Border CornerRadius="1" BorderBrush="Black" BorderThickness="1,1,1,1" Panel.ZIndex="2">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="16"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBox Name="TextBox_Num"
- MinHeight="28"
- Grid.Column="0"
- Padding="16,0,0,0"
- VerticalContentAlignment="Center"
- Background="#F3F3F3"
- BorderThickness="0"
- FontFamily="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CommonWritableComboBox}, Path=FontFamily}"
- FontSize="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CommonWritableComboBox}, Path=FontSize}"
- Foreground="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CommonWritableComboBox}, Path=Foreground}"
- InputMethod.IsInputMethodEnabled="False"
- PreviewTextInput="CountTextBox_PreviewTextInput"
- Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CommonWritableComboBox}, Path=Text}"
- TextAlignment="Left"
- KeyDown="CurrentPage_KeyDown"
- TextChanged="TextBox_Num_TextChanged"
- Panel.ZIndex="1"
- Style="{StaticResource PagesView_txtContext}">
-
- </TextBox>
- <ComboBox Name="ComboBox_Type" MinHeight="28" MinWidth="64" HorizontalAlignment="Right" BorderThickness="00" Background="#F3F3F3" Grid.Column="0" Grid.ColumnSpan="2" SelectionChanged="ComboBox_SelectionChanged" ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CommonWritableComboBox}, Path=TypeSouce}" Panel.ZIndex="0"
- >
- </ComboBox>
- </Grid>
- </Border>
- </UserControl>
|