PropertyGrid bind to Dictionary throw NotSupportedException on editor closing

Open
#1,784 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
desktop

Research direction

Start by reproducing the issue with the WPF PropertyGrid bound to a Dictionary<int, object>, then inspect the value-collection editor path used when OK or Cancel is clicked. Done means opening the values collection and closing the editor no longer throws NotSupportedException.

Written by the indexing model from the issue text.

Description

Hi,

I am experiencing an issue with the PropertyGrid when binding to a Dictionary<int, object>. The binding works correctly, and I can see the keys and values. However, when I open the values collection and then click OK/Cancel, a NotSupportedException is thrown with the message: “Mutating a value collection derived from a dictionary is not allowed.”

Steps to Reproduce:

  1. Bind a Dictionary<int, object> to the SelectedObject property.
  2. Open the values collection in the PropertyGrid.
  3. OK/Cancel the changes.

Thanks.

Dominant language
C#
Stars
4.2k
Forks
912
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from xceedsoftware/wpftoolkit

All issues in xceedsoftware/wpftoolkit

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.