Skip to content

StackOverflowException in binding #855

@donandren

Description

@donandren

StackOverflowException in binding when property is changed in setter before raise property changed.
That's probably the root reason for problem in #824

Example if you bind a listbox selected Item to property selected item and property is like:

            set
            {
                if (_selectedItem != value)
                {
                    int index = Items.IndexOf(value);
                    if (index > 1)//or some other logic that's changing the current value
                    {
                        _selectedItem = Items[index - 1];
                    }
                    else
                    {
                        _selectedItem = value;
                        
                    }
                    this.RaisePropertyChanged();
                }
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions