SlidContentPop.xaml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <UserControl x:Class="PDF_Office.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_Office.CustomControl.CompositeControl"
  7. mc:Ignorable="d"
  8. x:Name="usercontorls"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <ResourceDictionary.MergedDictionaries>
  13. <ResourceDictionary Source="../../Styles/SliderStyle.xaml"></ResourceDictionary>
  14. </ResourceDictionary.MergedDictionaries>
  15. </ResourceDictionary>
  16. </UserControl.Resources>
  17. <Border CornerRadius="4" BorderBrush="Black" Background="White" BorderThickness="2" Width="270" Height="112">
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="Auto"/>
  21. <RowDefinition/>
  22. </Grid.RowDefinitions>
  23. <TextBlock Text="toumingdu" Margin="16,12,0,0"/>
  24. <Grid Grid.Row="1">
  25. <Grid.ColumnDefinitions>
  26. <ColumnDefinition />
  27. <ColumnDefinition Width="auto"/>
  28. </Grid.ColumnDefinitions>
  29. <Slider Name="OpacitySlider" HorizontalAlignment="Left" VerticalAlignment="Center" Minimum="0" Maximum="1" IsSelectionRangeEnabled="True" IsSnapToTickEnabled="True" IsMoveToPointEnabled="True"
  30. Value="50" ValueChanged="OpacitySlider_ValueChanged"
  31. Style="{StaticResource RoundThumbSlider}" Width="148" TickFrequency="0.01"
  32. >
  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" HorizontalAlignment="Right" Background="Transparent" BorderBrush="#E2E3E6" Width="80" Height="32" BorderThickness="0">
  39. <Grid>
  40. <ComboBox Name="OpacityDropBox" BorderThickness="1" Background="Transparent" BorderBrush="#FFE2E3E6">
  41. <ComboBoxItem Content="25%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  42. </ComboBoxItem>
  43. <ComboBoxItem Content="50%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}" >
  44. </ComboBoxItem>
  45. <ComboBoxItem Content="75%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}">
  46. </ComboBoxItem>
  47. <ComboBoxItem Content="100%" Height="32" VerticalContentAlignment="Center" Template="{StaticResource comboxitem}" >
  48. </ComboBoxItem>
  49. </ComboBox>
  50. <TextBox FontFamily="Segoe UI" FontSize="14" Background="White" Height="20" Margin="2,0,23,0" IsReadOnly="True"
  51. BorderThickness="0" VerticalAlignment="Center" TextAlignment="Center">
  52. <TextBox.Style>
  53. <Style TargetType="TextBox">
  54. <Style.Setters>
  55. <Setter Property="TextBox.Text">
  56. <Setter.Value>
  57. <MultiBinding StringFormat="P0">
  58. <Binding ElementName="OpacitySlider" Path="Value"></Binding>
  59. </MultiBinding>
  60. </Setter.Value>
  61. </Setter>
  62. </Style.Setters>
  63. </Style>
  64. </TextBox.Style>
  65. </TextBox>
  66. </Grid>
  67. </Border>
  68. </Grid>
  69. </Grid>
  70. </Border>
  71. </UserControl>