Icon for RadWindow

3 posts, 0 answers
  1. David Parvin
    David Parvin avatar
    4 posts
    Member since:
    May 2010

    Posted 21 Jul 2010 Link to this post

    I have replaced several of my dialog forms with RadWindow form in my WPF application and the Application Icon that used to show on the dialogs don't seem to show on the RadWindow.  I have tried a lot of different ways of getting the Icon to show including the following:


    if (((System.Windows.Controls.Canvas)this.Parent).Parent is Window)
        Window thisWindow = ((System.Windows.Controls.Canvas)this.Parent).Parent as Window;
        thisWindow.ShowInTaskbar = true;
        thisWindow.Title = this.Header.ToString();
        this.Icon = thisWindow.Icon;

    The Icon shows in the taskbar correctly, but nothing is shown on the RadWindow itself.  Is there something I am doing wrong?  Some setting someplace that I am missing that will make it magically show it?

    I tried:
    Uri iconUri = new Uri("pack://application:,,,/WPFIcon2.ico", UriKind.RelativeOrAbsolute);
    this.Icon = BitmapFrame.Create(iconUri);

    and I get the text "pack://application:,,,/WPFIcon2.ico" where the Icon should be.

    I even tried creating a System.Drawing.Icon object and setting it to that and it just puts  "(Icon)" in the corner of the form.

    I have nothing in the XAML that refers to the Icon property for the window.  I assumed that the RadWindow type would automatically get the icon from the application, but I have not found any setting on the control that turns on or off the displaying of the icon.


  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 22 Jul 2010 Link to this post

    Hi David,

    Thank you for contacting us.

    You can try setting the IconTemplate property of the RadWindow. You can find an example in this online demo.

    Hope this helps. Please feel free to contact us again if you have any other inquiries.

    Sincerely yours,
    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
  3. Martin
    Martin avatar
    3 posts
    Member since:
    May 2014

    Posted 18 May 2014 in reply to David Parvin Link to this post

    Would have been nice someone answered this years ago. For future readers I will give the solution.

    The RadWindow.Icon is looking for an Image and you're (and I) giving and ImageSource.
    So instead you use:
    Image img = new Image();
    img.Source = BitmapFrame.Create(iconUri);
    this.Icon = img;
Back to Top