Problem with StackPanel template
-
Hi, I have a StackPanel that I want to use in a couple of data templates. At the moment I am copy-pasting the XAML for the stackpanel into each data template. I was hoping to be able to have the stackpanel as a resource (see below) but I can't figure out how to tell a stackpanel to use this as its template.
Call Details:
Any ideas how to acheive what I'm looking for? Thanks, dlarkin77
-
Hi, I have a StackPanel that I want to use in a couple of data templates. At the moment I am copy-pasting the XAML for the stackpanel into each data template. I was hoping to be able to have the stackpanel as a resource (see below) but I can't figure out how to tell a stackpanel to use this as its template.
Call Details:
Any ideas how to acheive what I'm looking for? Thanks, dlarkin77
One way would be to use a ContentControl, e.g.
<ContentControl Content="{StaticResource MyPanel}" />
Deja View - the feeling that you've seen this post before.
-
One way would be to use a ContentControl, e.g.
<ContentControl Content="{StaticResource MyPanel}" />
Deja View - the feeling that you've seen this post before.