CustomComboControl.xaml 2.9 KB

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