Does Adorner violate MVVM?

I am developing a WPF application using MVVM. Most of my views have only xaml markup and nothing (except the default template) behind the code.

All but one view that I use adorners to β€œblacken” the screen when I want to turn off the entire screen.

    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        //todo: transfer to modelview
        contentAreaAdorner = AdornerLayer.GetAdornerLayer(contentArea);
        waitingAdorner = new WaitingAdorner(contentArea);
    }

This is normal? Or is there a better way to implement this in my view model?

+5
source share
1 answer

Code reduction is an advantage of MVVM, not a goal.

MVVM - . , ? , ; . .

+17

All Articles