1

I want to put an icon on the top left of a radWindow programatically

my code is like this

    RadWindow radWindow = new RadWindow();
radWindow.Header = "The header";
radWindow.Icon = new Image()
   {
   Source = new BitmapImage(new Uri("../ressources/enregistrer.png", UriKind.Relative))
   };
radWindow.Show();

but the icon dont show up

does anyone have an idea ?

EDIT

This is the architecture on my project: The file from where the above code is taken is circled in red The ressource file is circled in green

enter image description here

4

2 回答 2

2
<telerik:RadWindow.Icon>
    <Image Source="pack://application:,,,/ressources/enregistrer.png" Height="18"/>
</telerik:RadWindow.Icon>

// this seems to work.  You will need to provide a size.
于 2014-04-30T07:07:11.907 回答
1

I dont know why my solution above did not work but I found a workaround like this

RadWindow radWindow = new RadWindow();
radWindow.Header = "The header";
radWindow.Icon = new Image()
{
                    Source = new BitmapImage(new Uri("pack://application:,,,/ressources/enregistrer.png", UriKind.RelativeOrAbsolute))
    }
 radWindow.Show();
于 2013-04-01T16:57:40.260 回答