SlidComboControl.xaml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <UserControl x:Class="PDF_Office.CustomControl.CompositeControl.SlidComboControl"
  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.CompositeControl"
  7. mc:Ignorable="d"
  8. x:Name="usercontrol"
  9. d:DesignHeight="450" d:DesignWidth="800"
  10. Loaded="UserControl_Loaded"
  11. >
  12. <UserControl.Resources>
  13. <ResourceDictionary>
  14. <ResourceDictionary.MergedDictionaries>
  15. <ResourceDictionary Source="../../Styles/SliderStyle.xaml"></ResourceDictionary>
  16. <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml"/>
  17. </ResourceDictionary.MergedDictionaries>
  18. </ResourceDictionary>
  19. </UserControl.Resources>
  20. <Grid>
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="Auto"/>
  23. <RowDefinition />
  24. </Grid.RowDefinitions>
  25. <TextBlock x:Name="thicknessText" FontFamily="Segoe UI Semibold" FontWeight="SemiBold" FontSize="14" LineHeight="20" Margin="12,14,0,0" >Thickness</TextBlock>
  26. <Grid Grid.Row="1">
  27. <Grid.ColumnDefinitions>
  28. <ColumnDefinition Width="*"></ColumnDefinition>
  29. <ColumnDefinition Width="auto"></ColumnDefinition>
  30. </Grid.ColumnDefinitions>
  31. <Slider Name="ThicknessSlider" VerticalAlignment="Center" Margin="12,0,0,0" Width="148" Minimum="0" Maximum="24" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True"
  32. Style="{StaticResource RoundThumbSlider}" TickFrequency="1" IsSnapToTickEnabled="True" Value="{Binding ElementName=usercontrol,Path=Value}" >
  33. <Slider.Resources>
  34. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
  35. <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
  36. </Slider.Resources>
  37. </Slider>
  38. <Border Grid.Column="1" BorderBrush="#E2E3E6" Width="80" Height="32" Margin="0,0,11,0" BorderThickness="0">
  39. <Grid>
  40. <ComboBox Name="ThicknessBox" BorderThickness="1" Padding="10" Background="Transparent" BorderBrush="#FFE2E3E6"
  41. MaxDropDownHeight="200">
  42. <ComboBox.ItemContainerStyle>
  43. <Style TargetType="{x:Type ComboBoxItem}">
  44. <Setter Property="Padding" Value="10 0 0 0"/>
  45. </Style>
  46. </ComboBox.ItemContainerStyle>
  47. <ComboBoxItem Content="1" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  48. <ComboBoxItem Content="3" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  49. <ComboBoxItem Content="6" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  50. <ComboBoxItem Content="9" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  51. <ComboBoxItem Content="12" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  52. <ComboBoxItem Content="15" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  53. <ComboBoxItem Content="18" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  54. <ComboBoxItem Content="21" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  55. <ComboBoxItem Content="24" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}"/>
  56. </ComboBox>
  57. <TextBox Name="ThicknessText" Background="White" FontFamily="Segoe UI" FontSize="14" Height="20" Margin="10,0,35,0" IsReadOnly="True"
  58. BorderThickness="0" VerticalAlignment="Center" TextAlignment="Left" >
  59. </TextBox>
  60. </Grid>
  61. </Border>
  62. </Grid>
  63. </Grid>
  64. </UserControl>