protected virtual void OnPropertyChanged(PropertyNotificationEventArgs args) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, args); } }
protected override void OnPropertyChanged(PropertyNotificationEventArgs args) { if (args.PropertyName.Equals("Visual")) { _display = args.NewValue as OpenFalconTextureDisplay; OnRefresh(); } base.OnPropertyChanged(args); }
protected override void OnPropertyChanged(PropertyNotificationEventArgs args) { if (args.PropertyName.Equals("Width") || args.PropertyName.Equals("Height")) { double scaleX = Width / NativeSize.Width; double scaleY = Height / NativeSize.Height; ScaleChildrenInt(scaleX, scaleY); } base.OnPropertyChanged(args); }
protected void OnPropertyChanged(string childPropertyName, PropertyNotificationEventArgs args) { OnPropertyChanged(new PropertyNotificationEventArgs(this, childPropertyName, args)); }
protected override void OnPropertyChanged(PropertyNotificationEventArgs args) { if (args.PropertyName.Equals("Width") || args.PropertyName.Equals("Height")) { double scaleX = Width / NativeSize.Width; double scaleY = Height / NativeSize.Height; _guardUpRegion = GuardedToggleSwitch.GuardUpRegion; _guardUpRegion.Scale(scaleX, scaleY); _switchRegion = GuardedToggleSwitch.SwitchRegion; _switchRegion.Scale(scaleX, scaleY); _guardDownRegion = GuardedToggleSwitch.GuardDownRegion; _guardDownRegion.Scale(scaleX, scaleY); } base.OnPropertyChanged(args); }
/// <summary> /// Constructs a child notification event based of childs propertynotification /// </summary> /// <param name="eventSource">Object whose child object has a property changed.</param> /// <param name="childPropertyName">Name of the property which represents the child object whose property has chagned.</param> /// <param name="childNotification">Event args for child's property notification.</param> public PropertyNotificationEventArgs(object eventSource, string childPropertyName, PropertyNotificationEventArgs childNotification) : this(eventSource, childPropertyName, null, null, childNotification.IsUndoable) { _childNotification = childNotification; }
protected override void OnPropertyChanged(PropertyNotificationEventArgs args) { if (args.PropertyName.Equals("Width") || args.PropertyName.Equals("Height")) { UpdatePoints(); } base.OnPropertyChanged(args); }
protected override void OnPropertyChanged(PropertyNotificationEventArgs args) { OnDisplayUpdate(); base.OnPropertyChanged(args); }
void PositionChanged(object sender, RotarySwitchPositionChangeArgs e) { PropertyNotificationEventArgs args = new PropertyNotificationEventArgs(e.Position, e.PropertyName, e.OldValue, e.NewValue, true); if (e.PropertyName.Equals("Rotation")) { _rotation = Positions[CurrentPosition - 1].Rotation; } OnPropertyChanged("Positions", args); UpdateValueHelp(); Refresh(); }
public void AddPropertyChange(object sender, PropertyNotificationEventArgs notification) { if (notification != null && notification.IsUndoable) { while (notification.HasChildNotification) { notification = notification.ChildNotification; } AddPropertyChange(notification.EventSource, notification.PropertyName, notification.OldValue, notification.NewValue); } }