123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <UserControl x:Class="Compdfkit_Tools.Common.WritableComboBoxControl"
- 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:Compdfkit_Tools.Common"
- mc:Ignorable="d"
- d:DesignHeight="24"
- d:DesignWidth="200">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition Width="20"/>
- </Grid.ColumnDefinitions>
- <ComboBox
- x:Name="ComboBox"
- MinHeight="24"
- MinWidth="60"
- VerticalContentAlignment="Center"
- Grid.ColumnSpan="2"
- SelectedIndex="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:WritableComboBoxControl}, Path=SelectedIndex}"
- SelectionChanged ="ComboBox_SelectionChanged"
- Style="{StaticResource ComboBoxStyle1}">
- <ComboBoxItem Content="All Pages" Tag="AllPages"></ComboBoxItem>
- <ComboBoxItem Content="Odd Pages" Tag="OddPages"></ComboBoxItem>
- <ComboBoxItem Content="Even Pages" Tag="EvenPages"></ComboBoxItem>
- <ComboBoxItem Content="Custom Pages" Tag="CustomPages"></ComboBoxItem>
- </ComboBox>
- <TextBox
- x:Name="TextBox"
- MinHeight="{Binding ElementName=ComboBox, Path=MinHeight}"
- BorderBrush="{x:Null}"
- BorderThickness="0"
- Panel.ZIndex="1"
- Margin="2"
- Background="#CCCCCC"
- PreviewKeyDown="TextBox_PreviewKeyDown"
- InputMethod.IsInputMethodEnabled="False"
- PreviewTextInput="TextBox_PreviewTextInput"
- TextChanged="TextBox_TextChanged"
- VerticalContentAlignment="Center"
- Visibility="Hidden"></TextBox>
- </Grid>
- </UserControl>
|