Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColumnDefinitions.Clear() throws an exception #1006

Closed
9 tasks
jeromelaban opened this issue Jun 3, 2019 · 3 comments · Fixed by #1007
Closed
9 tasks

ColumnDefinitions.Clear() throws an exception #1006

jeromelaban opened this issue Jun 3, 2019 · 3 comments · Fixed by #1007
Labels
kind/bug Something isn't working

Comments

@jeromelaban
Copy link
Member

Current behavior

Calling Grid.ColumnDefinitions.Clear() throws an exception.

How to reproduce it (as minimally and precisely as possible)

gridDeviceInfo.ColumnDefinitions.Clear();
gridDeviceInfo.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
gridDeviceInfo.ColumnDefinitions.Clear(); //Throws System.InvalidOperationException: Collection was modified; enumeration operation may not execute.

Environment

Nuget Package:

Package Version(s): 1.45

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • Windows
  • Build tasks

Visual Studio

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins

  • Resharper (version: )

Anything else we need to know?

@jeromelaban jeromelaban added the kind/bug Something isn't working label Jun 3, 2019
@carldebilly
Copy link
Member

Should use the new MaterializableList to fix this.

@jeromelaban
Copy link
Member Author

Cannot use it, it's a dictionary there.

@carldebilly
Copy link
Member

We should create a new MaterializableDictionary using the same patterns ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants