Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: Screen swallowing exception in DisplayName

$
0
0

Good day,

I've stumbled across a problem.

If, for example, there is some sort of exception in the DisplayName property getter for a Caliburn.Micro.Screen, no exception bubbles up throw the framework when starting up an WPF application (which displays the MainView/MainViewModel).

 

publicclass MainViewModel : Screen
    {
        public MainViewModel()
        {
        }

        publicoverridestring DisplayName
        {
            get
            {
                thrownew NotImplementedException();
            }
            set
            {
                base.DisplayName = value;
            }
        }
    }

MainView.xaml is a <Window> that contains an empty grid

 

If I change the class to manually implement IScreen, the exception bubbles up as expected.

 

Is there any way to have these exceptions bubble up through the framework?

 

Thanks,

James


Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>