tags:

views:

88

answers:

1

I have the following class,

internal class PageInformation
{
    public string Name
    {
        get;
        set;
    }
    public Uri PageUri
    {
        get;
        set;
    }
}

How can I use it in XAML (a page) and assign values to its properties?

Update-1:

I added xmlns attribute in page tag

<Page xmlns:local="clr-namespace:Demo.Pages">

and inherited PageInformation from DependencyObject (to have dependency properties).

Still XAML does not recognize the PageInformation class

+1  A: 

I was trying to use PageInformation element in a Canvas. Since it is not a UIElement, I think, It can't be added there.

I can use it as a resource element instead (in Page.Resources) :)

Vijay