Does Adorner breaks MVVM?

Posted by Padu Merloti on Stack Overflow See other posts from Stack Overflow or by Padu Merloti
Published on 2010-03-24T04:18:34Z Indexed on 2010/03/24 4:23 UTC
Read the original article Hit count: 254

Filed under:
|
|
|
|

I'm developing a WPF app using MVVM. Most of my views have only xaml markup and nothing (except default boilerplate) on code behind.

All except one view that I use adorners to "blacken" the screen when I want to make the whole screen disabled.

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

Is that ok? Or is there a better way to implement this in my viewmodel?

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf