Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Dependency Injection Errors in Xaml Previewer

$
0
0

Hi All,

I'm getting exceptions when tying to preview my xaml in the designer preview (I'm using VS for Mac, and have the same issue with Windows).

I know the Cause, but not sure how to resolve it.

In my code behind file for each page, I have a BindingContext = IoC.Resolve(); line of code, which resolves the view model.

Now when I try to view this file in the designer preview, I get the exception breaking at the IoC.Resolve line.

Is there anywhere I can register my types as a sort of pre-run stage in the previewer or is this simply not possible with my setup?

Thanks,
Nick


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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