Answer the question
In order to leave comments, you need to log in
How to automatically select a DataTemplate in a Windows 10 app?
The existing solution ( stackoverflow.com/a/3132989/2159197 ) doesn't fit the new application type.
A custom DataTypeSelector breaks the app on startup with the message: "Failed to create a 'App.Controls.Template' from the text 'models:NewAccount'. [Line: 55 Position: 56]" (source: pastebin.com/eqFb91ZP)
Answer the question
In order to leave comments, you need to log in
I can’t look at the paste code, but I encountered a similar problem in the recent past, the reason is that in UWP you can’t set a template in this way, which is a pity (it’s very convenient for WPF). For myself, I use the ViewModel Locator, I didn’t find anything better.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question