Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Custom Canvas control's dependency property not visible in XAML intellisense

$
0
0

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


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>