About RadWindow.Alert FontFamily

2 posts, 1 answers
  1. Kelley Wong
    Kelley Wong avatar
    21 posts
    Member since:
    May 2010

    Posted 24 Sep 2011 Link to this post

    using version 2011.1.0419 ,when i set the usercontrol's fontfamily ,the fontfamily of the RadWindow.Alert() is the same as that set in the usercontrol .
    today i update to version 2011.2.0920 , the fontfamily set in the usercontrol is not usefull to RadWindow.Alert() !

    the same problem is also in the RadChart Control

    public partial class Login : UserControl
            public Login()
                FontFamily = new System.Windows.Media.FontFamily(BSC.Resources.CommonResource.ResourceManager.GetString("FontFamilyString", System.Threading.Thread.CurrentThread.CurrentUICulture));
           internal void CheckState()
  2. Answer
    Ivo avatar
    390 posts

    Posted 29 Sep 2011 Link to this post

    Hello Kelley,

    Introducing Q2 version of RadControls for Silverlight there were major changes in RadWindow control. We moved the RadWindow's popups out of the VisualTree, because placing it into the VisualTree was a work-around intended for internal use only which we don't need anymore.

    That's why your code is not working properly now. I would suggest you use the DialogParameters parameter of RadWindow.Alert(). Here is sample code:
    var dialogParameters = new DialogParameters();
    dialogParameters.WindowStyle = new System.Windows.Style(typeof(RadWindow));
    var setter = new Setter(RadWindow.FontFamilyProperty, this.FontFamily);
    dialogParameters.Content = "Pass!";

    or using static defined style in XAML:
    var dialogParameters = new DialogParameters();
    var style = App.Current.Resources["RadWindowStyle"] as Style;
    dialogParameters.WindowStyle = style;
    dialogParameters.Content = "Pass!";

    Hope this helps.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top