Closed ToddBonnewell closed 8 years ago
9 days. Not one comment?
Hi @ToddBonnewell, sorry for the delay on this. We might have broken this with one of our latest check-ins. Good finding, here's a solution that brings back the configuration of the dependency container at design time:
Add this class to the PhotoSharing.Universal project:
namespace PhotoSharingApp.Universal.Unity
{
public class DesignTimeInitializer
{
public DesignTimeInitializer()
{
if (DesignMode.DesignModeEnabled && UnityBootstrapper.Container == null)
{
UnityBootstrapper.Init();
UnityBootstrapper.ConfigureRegistries();
}
}
}
}
And in Styles.xaml, add following initialization at the beginning of the file:
<unity:DesignTimeInitializer x:Key="DesignTimeInitializer"/>
Once you've configured Unity to load up at design time, it will populate data from the PhotoDummyService, if you're in Debug mode and have the DUMMY_SERVICE compiler directive set.
Let me know if you have any questions.
Thanks!!!!
Following the documentation I notice I cannot view Design Time data. When I open LeaderboardsPage.xaml I am not seeing the data, just a ListView of categories. In the Error List in Visual Studio it reports:
ServiceLocationProvider must be set
How can I get some DesignTime data working? Thanks!