CustomComboControl.xaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <UserControl
  2. x:Class="PDF_Office.CustomControl.CompositeControl.CustomComboControl"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. x:Name="usercontrol"
  9. d:DesignHeight="450"
  10. d:DesignWidth="800"
  11. Loaded="UserControl_Loaded"
  12. mc:Ignorable="d">
  13. <UserControl.Resources>
  14. <ResourceDictionary>
  15. <ResourceDictionary.MergedDictionaries>
  16. <ResourceDictionary Source="../../Styles/SliderStyle.xaml" />
  17. <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml" />
  18. </ResourceDictionary.MergedDictionaries>
  19. <DataTemplate x:Key="numberData">
  20. <Grid>
  21. <TextBlock
  22. HorizontalAlignment="Center"
  23. VerticalAlignment="Center"
  24. Text="{Binding Content}" />
  25. </Grid>
  26. </DataTemplate>
  27. </ResourceDictionary>
  28. </UserControl.Resources>
  29. <Grid>
  30. <Grid>
  31. <Grid.ColumnDefinitions>
  32. <ColumnDefinition Width="*" />
  33. <ColumnDefinition Width="auto" />
  34. </Grid.ColumnDefinitions>
  35. <Border
  36. Height="32"
  37. HorizontalAlignment="Stretch"
  38. BorderBrush="#E2E3E6"
  39. BorderThickness="0">
  40. <Grid>
  41. <ComboBox
  42. Name="comBox"
  43. Padding="10"
  44. BorderBrush="#FFE2E3E6"
  45. BorderThickness="1"
  46. ItemTemplate="{StaticResource numberData}"
  47. MaxDropDownHeight="200" />
  48. <TextBox
  49. Name="title"
  50. Height="20"
  51. Margin="10,0,35,0"
  52. VerticalAlignment="Center"
  53. Background="White"
  54. BorderThickness="0"
  55. FontFamily="Segoe UI"
  56. FontSize="14"
  57. IsReadOnly="True"
  58. TextAlignment="Left" />
  59. </Grid>
  60. </Border>
  61. </Grid>
  62. </Grid>
  63. </UserControl>