protected virtual void OnContentChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, object> arg) { if (arg.Property.IsObjectValueChanging) { arg.ExecuteAfterChange += (sender, args) => { if (arg.Property.OldValue is UIElement oldValue) { if (oldValue != null) { oldValue.LogicalParent = null; } } if (arg.Property.NewValue is UIElement newValue) { if (newValue.LogicalParent != null) { throw new ArgumentException($"The Element is already Chiled of {newValue.VisualParent}"); } if (newValue != null) { newValue.LogicalParent = this; } } UpdateContentPresenter(); } } ; }
protected virtual void OnContentPresenterChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, ContentPresenter> arg) { if (arg.Property.IsObjectValueChanging) { arg.ExecuteAfterChange += (sender, args) => UpdateContentPresenter(); } }
protected virtual void OnValueChanging(NDProperty.Propertys.OnChangingArg <Propertys.NDPConfiguration, int> arg) { if (arg.Property.IsObjectValueChanging) { arg.ExecuteAfterChange += (sender, e) => UpdateBlockPosition(); } }
protected virtual void OnOrientationChanging(NDProperty.Propertys.OnChangingArg <Propertys.NDPConfiguration, Orientation> arg) { if (arg.Property.IsObjectValueChanging) { arg.ExecuteAfterChange += (sender, e) => InvalidateMeasure(); } }
protected void OnFirstNameChanging(NDProperty.Propertys.OnChangingArg <NSCI.Propertys.NDPConfiguration, string> arg) { if (arg.Property.IsObjectValueChanging) { Name = $"{arg.Property.NewValue} {SureName}"; } }
private void OnCurrentSelectedIndexChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, int> arg) { if (arg.Provider.NewValue >= this.persons.Count || (arg.Provider.NewValue < 0 && this.persons.Count != 0)) { arg.Provider.Reject = true; } if (arg.Property.IsObjectValueChanging) { arg.ExecuteAfterChange += (sender, e) => Update(); } }
private void OnPanelChanging(NDProperty.Propertys.OnChangingArg <Propertys.NDPConfiguration, Panel> arg) { if (arg.Property.IsObjectValueChanging) { if (arg.Property.OldValue != null) { arg.Property.OldValue.VisualParent = null; } if (arg.Property.NewValue != null) { arg.Property.NewValue.VisualParent = this; } } }
protected virtual void OnBorderStyleChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, BorderStyle> arg) { if (arg.Property.IsObjectValueChanging) { arg.ExecuteAfterChange += (sender, args) => { var oldThickness = CalculateBorderThikness(args.Property.OldValue); var newThickness = CalculateBorderThikness(args.Property.NewValue); if (oldThickness != newThickness) { InvalidateMeasure(); } // InvalidateMeasure not always results in invalidate Render! InvalidateRender(); } } ; }
protected virtual void OnChildChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, UIElement> arg) { if (arg.Property.IsObjectValueChanging) { arg.ExecuteAfterChange += (sender, e) => { if (e.Property.OldValue?.VisualParent == this) { e.Property.OldValue.LogicalParent = null; e.Property.OldValue.VisualParent = null; } if (e.Property.NewValue != null) { e.Property.NewValue.VisualParent = this; e.Property.NewValue.LogicalParent = this; } InvalidateMeasure(); } } ; }
protected virtual void OnTextChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, string> arg) { if (arg.Provider.CanMutate) { arg.Provider.MutatedValue = arg.Provider.NewValue?.Replace("\t", " ").Replace("\r", ""); } if (arg.Property.IsObjectValueChanging) { arg.ExecuteAfterChange += (sender, e) => { var(_, oldWidht, oldHeight) = GetTextDimensions(e.Property.OldValue); var(_, newWidht, newHeight) = GetTextDimensions(e.Property.NewValue); if (oldHeight != newHeight || oldWidht != newWidht) { InvalidateMeasure(); } else { InvalidateArrange(); } } } ; }
private static void OnResourcesChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, object, Resources> arg) { }
private static void OnKeyChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, object, string> arg) { }
private static void OnTargetTypeChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, object, Type> arg) { }
private void OnCountChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, int> arg) { }
private void OnHasPreviousChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, bool> arg) { }
private void OnCurrentChanging(NDProperty.Propertys.OnChangingArg <NDPConfiguration, Person> arg) { }
protected void OnStreetChanging(NDProperty.Propertys.OnChangingArg <NSCI.Propertys.NDPConfiguration, string> arg) { }