Skip to content

Winforms - Control.ResetBindings() summary seems incorrect? #2016

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

Open
dsherret opened this issue Mar 12, 2019 · 2 comments
Open

Winforms - Control.ResetBindings() summary seems incorrect? #2016

dsherret opened this issue Mar 12, 2019 · 2 comments
Labels
area-WinForms Issues or PRs that relate to WinForms. help wanted Good for community contributors to help [up-for-grabs] Pri2 Indicates issues/PRs that are medium priority Pri3 Indicates issues/PRs that are low priority
Milestone

Comments

@dsherret
Copy link

dsherret commented Mar 12, 2019

Right now the xml summary for Control.ResetBindings reads:

<summary>Causes a control bound to the <see cref="T:System.Windows.Forms.BindingSource" /> to reread all the items in the list and refresh their displayed values.</summary>

Docs - Control.xml

The implementation clears all the bindings though:

public void ResetBindings() {
    ControlBindingsCollection bindings = (ControlBindingsCollection)Properties.GetObject(PropBindings);
    if (bindings != null) {
        bindings.Clear();
    }
}

Source

I think perhaps this summary was copied from BindingSource? (Docs)

@dotnet-bot dotnet-bot added the untriaged New issue has not been triaged by the area owner label Mar 12, 2019
@mairaw mairaw added area-WinForms Issues or PRs that relate to WinForms. help wanted Good for community contributors to help [up-for-grabs] and removed untriaged New issue has not been triaged by the area owner labels Mar 12, 2019
@mairaw mairaw added this to the Backlog milestone Mar 12, 2019
@mairaw
Copy link
Contributor

mairaw commented Mar 12, 2019

Thanks for your feedback @dsherret. The summary does look incorrect indeed.

Would you like to suggest a fix for this?

@mairaw mairaw added the Pri2 Indicates issues/PRs that are medium priority label Mar 12, 2019
@dsherret
Copy link
Author

@mairaw Probably:

<summary>Clears all the bindings in the <see cref="DataBindings" /> collection.</summary>

I can submit a PR if that's ok? Do I just edit the Control.xml file?

By the way, I wonder why these remarks were added for this method: This method is not relevant for this class. -- Probably because the method is confusing and a better name would be ClearBindings() or for someone to deal with the DataBindings collection directly?

@PRMerger13 PRMerger13 added the Pri3 Indicates issues/PRs that are low priority label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-WinForms Issues or PRs that relate to WinForms. help wanted Good for community contributors to help [up-for-grabs] Pri2 Indicates issues/PRs that are medium priority Pri3 Indicates issues/PRs that are low priority
Projects
None yet
Development

No branches or pull requests

4 participants