Question

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

Was it helpful?

Solution 2

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();

OTHER TIPS

<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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top