RadListControl font changed

3 posts, 1 answers
  1. Roy
    Roy avatar
    12 posts
    Member since:
    Sep 2013

    Posted 02 Oct 2013 Link to this post

    hi,
    I dont know whats the reason but after change the property ENABLED to false the font in listControl decrease,
    how should i prevent it?

    Image attached.

    Best regards,
    Roy
  2. Answer
    Dess
    Admin
    Dess avatar
    1608 posts

    Posted 07 Oct 2013 Link to this post

    Hello Roy,

    Thank you for contacting Telerik Support.

    Font changes comes from the default Theme font. In order to prevent font changing when enable/disable RadListControl, it is necessary to customize the theme or do it by code:
    1. Using Visual Style Builder, modify the theme and change the Font for both Normal and Disabled state. Please, have a look at the attached picture. After the theme edit process is complete, apply the custom theme to the application:
      ThemeResolutionService.LoadPackageFile(@"C:\Projects\743134 ListControlFont\ControlDefaultListControlFont.tssp");
      ThemeResolutionService.ApplicationThemeName = "ControlDefaultListControlFont";
    2. Subscribe to VisualItemFormatting event and apply the desired font. Please, have in mind the Font creating is a time consuming operation, that is why it is recommended to be previously created:
    3. Font newFont = new Font("Arial", 12f);
      public Form1()
      {
          InitializeComponent();
          this.radListControl1.VisualItemFormatting+=radListControl1_VisualItemFormatting;
      }
    private void radListControl1_VisualItemFormatting(object sender, VisualItemFormattingEventArgs args)
    {
        args.VisualItem.Font = newFont;
    }

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Roy
    Roy avatar
    12 posts
    Member since:
    Sep 2013

    Posted 07 Oct 2013 Link to this post

    Its works very well now,  
    thank you so much!
Back to Top