Hello. I have a custom Canvas control where I've defined a dependency property in the code-behind file as follows:
public partial class ImageCelOverlay : Canvas { public static readonly DependencyProperty TranslationXProperty = DependencyProperty.Register("TranslationX", typeof(Double), typeof(ImageCelOverlay), new PropertyMetadata(0.0)); public Double TranslationX { get { return (Double)GetValue(TranslationXProperty); } set { SetValue(TranslationXProperty, value); } }
In the same controls XAML file I try to access the above dependency property to bind it to something but it will not appear in the intellisesne and, indeed, gives me a red squiggly if I try to use it anyway. I've tried rebuilding and restarting VS 2015 but I can't get it to show up. What am I doing wrong here? Thank you in advance.
-L