Skip to content

Validation adorner does show up for controls with initial errors inside an Expander #1166

@batzen

Description

@batzen
  • .NET Core Version: All
  • Windows version: 1903
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes

Problem description:
This issue occurs on controls that "hide" their child controls. These controls are, for example, Expander and TabControl.

Actual behavior:
Validation adorner does not show up for not yet visible controls with validation errors.

Expected behavior:
Validation adorner should show up as soon as controls get visible if they were not visible before but have validation errors.

Minimal repro:

  • Create an object that implements INotifyDataErrorInfo
  • Always return true in HasErrors
  • Always return some text in GetErrors
  • Create a property on that object
  • Create a TextBox and bind to the property on the object
  • Place the TextBox inside a collapsed (IsExpanded=False) Expander
  • Expand the Expander, no validation adorner is shown

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugProduct bug (most likely)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions