Thanks for your quicly replay.
This is not exactly what I want.
In your example it change all components for new font an new size.
Whant I need is:
When I create a new form or new user control, when I drag xtra components or visual studio components, it load with default font. What I need is to change this default font.
Imagine the following scenario: I drag 50 controls, from these controls I want 45 with font calibri and size 10, another ones i want differnt fonts and different sizes. Make sense create the form with default font with calibri and size 10 and manually, i change the other controls for the others fonts and other sizes.
So, is it possible change default font and size in design mode?
By default when we create windows form or user control in my visual studio de default font is Microsoft Sans Serif, 8.25pt.(we can change for another font and size). If I drag any visual studio control, it takes the font Microsoft Sans Serif, 8.25pt.
If i drag devxpress controls it takes Tahoma, 8.25pt
I don't like these fonts, so in properties font I change for example Calibri, 9pt. Now if I drag visual studio control, it takes this font this font by default for all controls.
If I drag devexpress controls, its keep the same font (Tahoma, 8.25pt).
I think you could improve this feature. If somebody doesn't like this font, should change in all controls manually or programmatically.
Sorry for the misunderstanding. Please try the solution descried in the DefaultFont when using XtraForm and XtraEditors thread, and let me know whether it meets your requirements.
I created a form and I added styleController component then in the appearance property, I set the font for Calibri, 9pt and I saved the form.
Now I drag devxpress controls and the font still Tahoma, 8.25pt. Apparently the styleController didn ́t do nothing.
I don’t know what is wrong.
See attach project.
The StyleController only changes settings for controls to which it is assigned. You need to assign a StyleController to the BaseControl.StyleController property to apply settings to a control. To change the settings globally, use the approach described in the How to change the font of all the controls, which use the Appearances technology of DevExpress.Utils Knowledge Base article.
Good Morning Uriah,
We are spending a lot of time with this issue.
From your answer I can not set via styleController properties new default font.
I see and I tested programmatically and it is possible. How I wrote before, I don’t use it because the most forms have at least one control with different font of the default.
What I would like is to keep the logic of the visual studio, by another words, if you create a form, and then you choose the font and size for another one, this font will be the default font for new controls that you will add to this form.
I tried to used StyleController to do this, but it doesn’t work or I couldn’t understand.
If you have any example, I appreciate, if not, we close this issue.
Sorry for the unclear explanation. Our editors use their own engine for style settings. Instead of using the Form's settings, they rely on the StyleController assigned to the editor. If the StyleController is not assigned, the DevExpress.Utils.AppearanceObject is used. Modifying the DevExpress.Utils.AppearanceObject properties in the entry point of the application doesn't affect the design-time visibility of the control. The new Font will be used at run time only.
I should say that if you use the LayoutControl as a container for components, you can use the LayoutControl.Appearance.AppearanceControl property to specify the default appearance for all controls added to the LayoutControl. The LayoutControl will act as the StyleController, and will automatically assign itself to each BaseControl descendant that is added to its controls collection. Attached is a sample project, illustrating this, and demonstrating how to use a separate StileController to provide different appearance settings for some controls.
Please let me know, whether this solution meets your requirements.