private static void PointValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { ShowPoint obj = sender as ShowPoint; (obj.Template.FindName("txtPointValue", obj) as TextBox).Text = e.NewValue.ToString(); //obj._DWriteRegister?.Invoke(obj, "PointValue", e.NewValue); }
void ShowPoint_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { ShowPoint obj = (ShowPoint)sender; Path path1 = obj.Template.FindName("StyleShowPoint", obj) as Path; if (!_isLeftShowPoint) { obj.Style = obj.FindResource("StyleShowPoint") as Style; _isLeftShowPoint = true; } else { obj.Style = obj.FindResource("StyleShowPoint") as Style; _isLeftShowPoint = false; } }
private static void UnitNameChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { ShowPoint line = sender as ShowPoint; (line.Template.FindName("lbUnit", line) as Label).Content = e.NewValue.ToString(); }