This is a migrated thread and some comments may be shown as answers.

How to add images?

3 Answers 133 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Andi
Top achievements
Rank 2
Andi asked on 23 Aug 2010, 08:50 AM
Hi there,

I want to add images to my TreeViewItems, but it does not work :(
I knew there are many Threads for this theme and I read many of them, but I found no answer which can help me.
I have just a simple .xaml with the Tree and 3 Items and a folder named "Icons" in the source-folder of my project.
What am I doing wrong?

<Window x:Class="TreeViewTest.MainWindow"
        Title="MainWindow" Height="350" Width="525" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Icon="/TreeViewTest;component/ics.ico">
    <Grid>
        <telerik:RadTreeView  HorizontalAlignment="Left"  Name="treeView1" VerticalAlignment="Top" IsLineEnabled="True" FontFamily="Arial" FontSize="10" ImagesBaseDir="/Icons/" IsDragPreviewEnabled="False">
            <telerik:RadTreeViewItem Header="Global" DefaultImageSrc="Folder_16x16-32.png">
                <telerik:RadTreeViewItem Header="Local 1" />
                <telerik:RadTreeViewItem Header="Local 2" />
            </telerik:RadTreeViewItem>
        </telerik:RadTreeView>       
    </Grid>
</Window>

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 26 Aug 2010, 11:46 AM
Hi Andi,


Please accept my apology for the delayed response. Unfortunately I couldn't reproduce your issue. Can you please take a look at the project I used for testing and let me know if it works for you or if I am missing something?

Thank you in advance.

Sincerely yours,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andi
Top achievements
Rank 2
answered on 26 Aug 2010, 11:56 AM
Hi Tina,
thank you for your response.
I have found the failure. I have to add the images to my project and then it works fine.
Sometimes the biggest bug is sitting in front of the keyboard :D
0
Tina Stancheva
Telerik team
answered on 26 Aug 2010, 11:59 AM
Hello Andi,

I am glad you got it working. However, should you need any additional help or info, please let us know and we will be more than happy to assist you.

Kind regards,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Andi
Top achievements
Rank 2
Answers by
Tina Stancheva
Telerik team
Andi
Top achievements
Rank 2
Share this question
or