UnityMvvmToolkit icon indicating copy to clipboard operation
UnityMvvmToolkit copied to clipboard

Some nested members are not properly retrieved

Open Hellfim opened this issue 2 years ago • 0 comments

Private/protected members declared in inherited classes are not always properly retrieved. Suppose we have following structure of ViewModels

public class BaseViewModel { }

public class MiddleViewModel : BaseViewModel
{
    [Observable("MyTestInt")]
    private IProperty<Int32> _myTestInt;

    public MiddleClass()
    {
        _myTestInt = new Property<Int32>(123);
    }
}

public class TopLevelViewModel : MiddleViewModel
{
}

If one were to try bind TopLevelViewModel's MyTestInt from it's parent class, then exception InvalidOperationException: Property 'MyTestInt' not found. would be raised.

Hellfim avatar Nov 18 '23 19:11 Hellfim