Skip to content

MultipleX and MultipleY are missing the ConstraintPropertyChanged callback #4166

Closed
@sylveon

Description

@sylveon

Describe the bug

The MultipleX and MultipleY dependency properties on ConstrainedBox do not register the ConstraintPropertyChanged callback, meaning that if they are changed, the layout isn't updated until something else invalidates it

  • Is this bug a regression in the toolkit? No

For example ScaleY:

public static readonly DependencyProperty ScaleYProperty =
DependencyProperty.Register(nameof(ScaleY), typeof(double), typeof(ConstrainedBox), new PropertyMetadata(1.0, ConstraintPropertyChanged));

Compared to MultipleY:

public static readonly DependencyProperty MultipleYProperty =
DependencyProperty.Register(nameof(MultipleY), typeof(int), typeof(ConstrainedBox), new PropertyMetadata(null));

Steps to Reproduce

  • Can this be reproduced in the Sample App? (Either in a sample as-is or with new XAML pasted in the editor.) If so, please provide custom XAML or steps to reproduce. If not, let us know why it can't be reproduced (e.g. more complex setup, environment, dependencies, etc...)

Steps to reproduce the behavior:

  1. Use the constrained box control somewhere.
  2. Modify MultipleX or MultipleY at runtime.
  3. Observe that changes do not apply until a manual layout invalidation.

Expected behavior

The changes should apply instantly

Screenshots

N/A

Environment

N/A, bug found while reading the source code.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions