Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Get Name of Dependency Property

Back to Forum: Tech Off
  • User profile image
    LotharV

    Hi

    For a project I need to get the Name of a DependencyProperty. but I can't figure out how. It is a WinRt project.

    I need some way to retrieve the name "VerticalLines" I used in the following RegisterAttached.

     public static Dictionary<int, int> GetVerticalLines(DependencyObject obj)
            {
                return (Dictionary<int, int>)obj.GetValue(VerticalLinesProperty);
            }
            public static void SetVerticalLines(DependencyObject obj, Dictionary<int, int> value)
            {
                obj.SetValue(VerticalLinesProperty, value);
            }
            public static readonly DependencyProperty VerticalLinesProperty =
                DependencyProperty.RegisterAttached("VerticalLines", typeof(Dictionary<int, int>), typeof(ResizeBehavior), new PropertyMetadata(new Dictionary<int, int>()));
    

    Thanks in advance,

    Lothar

  • User profile image
    Sven Groot

    How about VerticalLinesProperty.Name?

  • User profile image
    LotharV

    @Sven Groot: The Name property isn't supported in winrt...

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.