Skip to content

Exception when casting from {{DisconectedItem}} to Collection Type #3

@Yuki-Codes

Description

@Yuki-Codes

If the treeview contents are changed during MouseDown an Exception is thrown when the mouse is released.

SelectionMultiple.OnMouseUp(MousebuttonEventArgs) [Line 267] Should probably check if the selectItem.DataContext has been set to a DisconnectedSource before attempting to select the item.

In .Net 4.5+ this can be done with if (selectItem.DataContext == BindingOperations.DisconnectedSource) however in earlier .NET versions the only way to check is with a string compare like if ((string)selectItem.DataContext == "{{DisconectedItem}}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions