Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
Header template for XamTreeItem
posted

Hi,

Is there an easy way to template the XamTreeItem

This is my example:

<ig:XamTree x:Name="trvOverview" >
            <ig:XamTreeItem Header="My Box" IsExpanded="True" Tag="Box">
                <ig:XamTreeItem Header="Inbox (4)" Tag="IKP_INBOX" />
            </ig:XamTreeItem>
</ig:XamTree>

How can I template the header of the TreeItem. I want the number of unread items (4) to appear in another color.

I don't want to use databinding, because the items ar fixed.

Thx,
Bart
Parents
  • 21382
    Verified Answer
    posted

    The Header object is a content object you can put almost anything into it rather then just text.

       <ig:XamTreeItem  >

                        <ig:XamTreeItem.Header>                        

                                <HyperlinkButton Background="Yellow" Content="GoTo" NavigateUri="http://www.yahoo.com" TargetName="_blank"></HyperlinkButton>

                        </ig:XamTreeItem.Header>

                    </ig:XamTreeItem>

Reply Children
No Data