This is a migrated thread and some comments may be shown as answers.

RadListControl font changed

2 Answers 80 Views
ListControl
This is a migrated thread and some comments may be shown as answers.
Roy
Top achievements
Rank 1
Roy asked on 02 Oct 2013, 06:30 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Oct 2013, 03:26 PM
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 >>
0
Roy
Top achievements
Rank 1
answered on 07 Oct 2013, 03:38 PM
Its works very well now,  
thank you so much!
Tags
ListControl
Asked by
Roy
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Roy
Top achievements
Rank 1
Share this question
or