canton7 / Stylet

A very lightweight but powerful ViewModel-First MVVM framework for WPF for .NET Framework and .NET Core, inspired by Caliburn.Micro.
MIT License
995 stars 144 forks source link

I have a class ScreenEx that inherits from Screen, rewriting OnActivate in a new ViewModel that is unresponsive #385

Closed kuangxj closed 5 months ago

kuangxj commented 1 year ago

Description I have a class ScreenEx that inherits from Screen, rewriting OnActivate in a new ViewModel that is unresponsive

To Reproduce

class ScreenEx : Screen
{
    public string ContentId { get; set; } = Guid.NewGuid().ToString();
}

class TestViewModel:ScreenEx,IDisposable
{

    protected override void OnActivate()
    {
        // After F9 ,not work.
        base.OnActivate();
    }
    public void Dispose()
    {

    }
}

Version Info

Additional Info Add any other context about the problem here.

canton7 commented 1 year ago

I tried to reproduce the problem using your code, but it worked fine.

kuangxj commented 11 months ago

I replied after trying.

canton7 commented 11 months ago

I'm not sure what you mean by that

kuangxj commented 5 months ago

I fix it,thanks.