N
N
Nikita Permin2015-10-23 21:47:51
C++ / C#
Nikita Permin, 2015-10-23 21:47:51

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

1 answer(s)
A
Artyom, 2015-10-23
@artem_b89

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 question

Ask a Question

731 491 924 answers to any question