Usually, when I build my UWP applications, I put all my DataTemplate
styles in a separate "Styles.xaml" file, to which the general ResourceDictionary
in App.xaml is linked to through merging them.
A standard way that all professional developers use.
This time, however, I need to add a function to a certain event in a xaml control inside a DataTemplate, but I know the way of doing it only when the DataTemplate
itself is defined inline (i.e. in the ItemTemplate
property).
How can I, then, add some back-code to this event?
-> Please note that I already know data-binding an event to a function in a ViewModel and I already use it... this time I'm talking about adding some back-code that is not related to (i.e. contained in) the 'model' itself.
Thank you for your attention.
Best regards.