SlidContentPop.xaml 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <UserControl x:Class="PDF_Master.CustomControl.CompositeControl.SlidContentPop"
  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_Master.CustomControl.CompositeControl"
  7. xmlns:mainpage="clr-namespace:PDF_Master.Strings.MainPage"
  8. mc:Ignorable="d"
  9. x:Name="usercontorls"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.Resources>
  12. <ResourceDictionary>
  13. <ResourceDictionary.MergedDictionaries>
  14. <ResourceDictionary Source="../../Styles/SliderStyle.xaml"></ResourceDictionary>
  15. </ResourceDictionary.MergedDictionaries>
  16. </ResourceDictionary>
  17. </UserControl.Resources>
  18. <Border CornerRadius="4" BorderBrush="Transparent" Background="White" BorderThickness="2" Width="244" Height="84">
  19. <Border.Effect>
  20. <DropShadowEffect
  21. BlurRadius="5"
  22. Direction="0"
  23. Opacity="0.16"
  24. ShadowDepth="0"
  25. Color="#000000" />
  26. </Border.Effect>
  27. <Grid>
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="Auto"/>
  30. <RowDefinition/>
  31. </Grid.RowDefinitions>
  32. <TextBlock Text="{x:Static mainpage:MainPage.Opacity_Title}" Margin="8,12,0,0"/>
  33. <Grid Grid.Row="1">
  34. <Grid.ColumnDefinitions>
  35. <ColumnDefinition />
  36. <ColumnDefinition Width="auto"/>
  37. </Grid.ColumnDefinitions>
  38. <Slider Name="OpacitySlider" HorizontalAlignment="Stretch" VerticalAlignment="Center" Minimum="0" Maximum="1" IsSelectionRangeEnabled="True" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True"
  39. Value="50" ValueChanged="OpacitySlider_ValueChanged"
  40. Style="{StaticResource RoundThumbSlider}" TickFrequency="0.01"
  41. >
  42. <Slider.Resources>
  43. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
  44. <SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
  45. </Slider.Resources>
  46. </Slider>
  47. <Border Grid.Column="1" Margin="16,0,8,0" HorizontalAlignment="Right" Background="Transparent" BorderBrush="#E2E3E6" Width="80" Height="32" BorderThickness="0">
  48. <Grid>
  49. <ComboBox Name="OpacityDropBox" SelectionChanged="OpacityDropBox_SelectionChanged" DropDownClosed="OpacityDropBox_DropDownClosed" DropDownOpened="OpacityDropBox_DropDownOpened" BorderThickness="1" Background="Transparent" BorderBrush="#FFE2E3E6">
  50. <ComboBoxItem Content="25%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  51. </ComboBoxItem>
  52. <ComboBoxItem Content="50%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}" >
  53. </ComboBoxItem>
  54. <ComboBoxItem Content="75%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  55. </ComboBoxItem>
  56. <ComboBoxItem Content="100%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}" >
  57. </ComboBoxItem>
  58. </ComboBox>
  59. <TextBox FontFamily="Segoe UI" FontSize="14" Background="White" Height="20" Margin="2,0,23,0" IsReadOnly="True"
  60. BorderThickness="0" VerticalAlignment="Center" TextAlignment="Center">
  61. <TextBox.Style>
  62. <Style TargetType="TextBox">
  63. <Style.Setters>
  64. <Setter Property="TextBox.Text">
  65. <Setter.Value>
  66. <MultiBinding StringFormat="P0">
  67. <Binding ElementName="OpacitySlider" Path="Value"></Binding>
  68. </MultiBinding>
  69. </Setter.Value>
  70. </Setter>
  71. </Style.Setters>
  72. </Style>
  73. </TextBox.Style>
  74. </TextBox>
  75. </Grid>
  76. </Border>
  77. </Grid>
  78. </Grid>
  79. </Border>
  80. </UserControl>