Skip to content

Add check for readonly to prevent InvalidOperationException - #659

Merged
sharpSteff merged 7 commits into
Dirkster99:masterfrom
bbuerger:master
Sep 21, 2026
Merged

sharpSteff merged 7 commits into
Dirkster99:masterfrom
bbuerger:master

Conversation

@bbuerger

Copy link
Copy Markdown
Contributor

The following exception occured when an element inside a Pane was focused using code:

System.InvalidOperationException: Die IsSelectionActive-Eigenschaft wurde als schreibgeschützt registriert und kann ohne Autorisierungsschlüssel nicht geändert werden.

To prevent this from happening the DependencyProperty is checked for the readonly flag.

Benny Bürger added 7 commits July 8, 2026 10:53
When unloading/loading occurs the owner of the window may have changed.
Add null checks and exception handling to prevent runtime errors in the
AutoHideWindowManager class. Updated `_closeTimer.Tick` to handle null
references and potential `InvalidOperationException` during layout changes.
Modified `StopCloseTimer` to use null-conditional operator for safer access.
Updated the SyncInheritedProperty method to return early if the
DependencyProperty is read-only, ensuring such properties are not
processed or modified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants