CommonWritableComboBox.xaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <UserControl x:Class="PDF_Office.CustomControl.CommonWritableComboBox"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Office.CustomControl"
  7. mc:Ignorable="d"
  8. d:DesignHeight="32" d:DesignWidth="66">
  9. <Border CornerRadius="1" BorderBrush="Black" BorderThickness="1,1,1,1" Panel.ZIndex="2">
  10. <Grid>
  11. <Grid.ColumnDefinitions>
  12. <ColumnDefinition Width="*"></ColumnDefinition>
  13. <ColumnDefinition Width="16"></ColumnDefinition>
  14. </Grid.ColumnDefinitions>
  15. <TextBox Name="TextBox_Num"
  16. MinHeight="28"
  17. Grid.Column="0"
  18. Padding="16,0,0,0"
  19. VerticalContentAlignment="Center"
  20. Background="#F3F3F3"
  21. BorderThickness="0"
  22. FontFamily="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CommonWritableComboBox}, Path=FontFamily}"
  23. FontSize="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CommonWritableComboBox}, Path=FontSize}"
  24. Foreground="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CommonWritableComboBox}, Path=Foreground}"
  25. InputMethod.IsInputMethodEnabled="False"
  26. PreviewTextInput="CountTextBox_PreviewTextInput"
  27. Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:CommonWritableComboBox}, Path=Text}"
  28. TextAlignment="Left"
  29. KeyDown="CurrentPage_KeyDown"
  30. TextChanged="TextBox_Num_TextChanged"
  31. Panel.ZIndex="1">
  32. </TextBox>
  33. <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">
  34. </ComboBox>
  35. </Grid>
  36. </Border>
  37. </UserControl>