|
@@ -36,8 +36,19 @@ namespace PDF_Master.CustomControl.CompositeControl
|
|
|
|
|
|
public static readonly DependencyProperty TitleProperty =
|
|
public static readonly DependencyProperty TitleProperty =
|
|
DependencyProperty.Register("Title", typeof(string), typeof(SlidComboControl), new PropertyMetadata("Line Width"));
|
|
DependencyProperty.Register("Title", typeof(string), typeof(SlidComboControl), new PropertyMetadata("Line Width"));
|
|
|
|
+ //public int IndexSelected
|
|
|
|
+ //{
|
|
|
|
+ // get { return (int)GetValue(IndexSelectedProperty); }
|
|
|
|
+ // set
|
|
|
|
+ // {
|
|
|
|
+ // SetValue(IndexSelectedProperty, value);
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
|
|
|
+ //public static readonly DependencyProperty IndexSelectedProperty =
|
|
|
|
+ // DependencyProperty.Register("IndexSelected", typeof(int), typeof(SlidComboControl), new PropertyMetadata(0));
|
|
|
|
+
|
|
public string Unit
|
|
public string Unit
|
|
{
|
|
{
|
|
get { return (string)GetValue(UnitProperty); }
|
|
get { return (string)GetValue(UnitProperty); }
|
|
@@ -46,7 +57,7 @@ namespace PDF_Master.CustomControl.CompositeControl
|
|
|
|
|
|
|
|
|
|
public static readonly DependencyProperty UnitProperty =
|
|
public static readonly DependencyProperty UnitProperty =
|
|
- DependencyProperty.Register("Unit", typeof(string), typeof(SlidComboControl), new PropertyMetadata("pt"));
|
|
|
|
|
|
+ DependencyProperty.Register("Unit", typeof(string), typeof(SlidComboControl), new PropertyMetadata("pt"));
|
|
|
|
|
|
public SlidComboControl()
|
|
public SlidComboControl()
|
|
{
|
|
{
|
|
@@ -143,15 +154,23 @@ namespace PDF_Master.CustomControl.CompositeControl
|
|
ValueChanged?.Invoke((double)sender, null);
|
|
ValueChanged?.Invoke((double)sender, null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+ //事件重复SelectedValuePropertyChanged 2023/4/4
|
|
|
|
+ //private void ThicknessSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
|
|
|
+ //{
|
|
|
|
+ // combox.SelectedItems = new ComboDataItem(Value);
|
|
|
|
+ // // ValueChanged?.Invoke(Value, null);
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //暂无作用,后续准备
|
|
|
|
+ public int SelectedIndex
|
|
|
|
+ {
|
|
|
|
+ get { return (int)GetValue(SelectedIndexProperty); }
|
|
|
|
+ set { SetValue(SelectedIndexProperty, value);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- //事件重复SelectedValuePropertyChanged 2023/4/4
|
|
|
|
- //private void ThicknessSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
|
|
|
- //{
|
|
|
|
- // combox.SelectedItems = new ComboDataItem(Value);
|
|
|
|
- // // ValueChanged?.Invoke(Value, null);
|
|
|
|
- //}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ public static readonly DependencyProperty SelectedIndexProperty =
|
|
|
|
+ DependencyProperty.Register("SelectedIndex", typeof(int), typeof(SlidComboControl), new PropertyMetadata(0));
|
|
public double Value
|
|
public double Value
|
|
{
|
|
{
|
|
get { return (double)GetValue(ValueProperty); }
|
|
get { return (double)GetValue(ValueProperty); }
|
|
@@ -165,9 +184,9 @@ namespace PDF_Master.CustomControl.CompositeControl
|
|
var value = (double)e.NewValue;
|
|
var value = (double)e.NewValue;
|
|
if (control != null)
|
|
if (control != null)
|
|
{
|
|
{
|
|
|
|
+
|
|
Trace.WriteLine("SelectedValuePropertyChanged" + value);
|
|
Trace.WriteLine("SelectedValuePropertyChanged" + value);
|
|
- control.combox.SelectedItems = new ComboDataItem(value, control.Unit);
|
|
|
|
-
|
|
|
|
|
|
+ control.combox.SelectedItems = new ComboDataItem(value, control.Unit);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|