using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace PDF_Office.CustomControl.CompositeControl
{
///
/// ThicknessContentPop.xaml 的交互逻辑
///
public partial class SlidContentPop : UserControl
{
public event EventHandler OpacityValueChangedHandler;
public bool isOpenLayout { get; private set; }
public SlidContentPop()
{
InitializeComponent();
}
private void OpacitySlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
{
OpacityValueChangedHandler?.Invoke(this, e.NewValue);
}
private void OpacityDropBox_DropDownClosed(object sender, EventArgs e)
{
isOpenLayout = false;
}
private void OpacityDropBox_DropDownOpened(object sender, EventArgs e)
{
isOpenLayout = true;
}
private void OpacityDropBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
switch(OpacityDropBox.SelectedIndex)
{
case 0:
OpacitySlider.Value = 0.25;
break;
case 1:
OpacitySlider.Value = 0.50;
break;
case 2:
OpacitySlider.Value = 0.75;
break;
case 3:
OpacitySlider.Value = 1;
break;
}
}
}
}