Hi,
I have a custom class that extends "Control" like so:
class TheCountry : Control
{
//...details
}
Then I have that element in my XAML:
<Canvas x:Name="mainCanvas" Height="768" Width="1536" AllowDrop="False">
<spots:TheCountry Country="Australia" Canvas.Left="1362" Canvas.Top="486" Template="{DynamicResource TheCountryIcon}" />
</Canvas>
And in my resources I have the template:
<UserControl.Resources>
<ControlTemplate x:Key="TheCountryIcon" TargetType="{x:Type spots:TheCountry}">
<Grid Width="35" Height="35">
<Image Source="{TemplateBinding Property=CountryImagePath}" Width="35" Height="35" AllowDrop="True"/>
</Grid>
</ControlTemplate>
</UserControl.Resources>
and I have the dependancy property called: CountryImagePath in my TheCountry class, but when I run my app, I do not get the image showing up...
I have even put a break point on the getter in the dependancy property, and it does not get hit...
Pleas help!
thanks Mark