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

Problem with load package file

4 Answers 114 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Qakmak
Top achievements
Rank 1
Qakmak asked on 08 May 2013, 10:51 AM
I'm use Visual Style Builder change the RadButton--->RadButtonElement--->TextPrimitive---> Margin:0,0,0,-6

and use in vs, like this:

public RadForm1()
       {
            
           InitializeComponent();
 
           ThemeResolutionService.LoadPackageFile(@"C:\Users\mamatjan\Desktop\xxxxxxxxxxxxxxxxxxxx\xx\MyTheme5.tssp");
           ThemeResolutionService.ApplicationThemeName = "MyTheme5";
            
            
       }


but when I'm run it. the button not use the style what I'm change, Until the mouse over the button, and button text margin is change.
why? and how I'm fixed it?(I just use font, and the font not change too)

4 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 08 May 2013, 09:10 PM
Hello,

The theme can and should be set prior to creating the form, i would suggest doing so in the Program.cs so that when the application first starts, the theme is already set.

Best Regards,
Emanuel Varga
0
Qakmak
Top achievements
Rank 1
answered on 09 May 2013, 05:08 AM
I'm just try add the code in Program.cs. 
but the result is same. I'm must mouse over the button, and the style is display. Otherwise the button font and font size is not change.
0
Accepted
Paul
Telerik team
answered on 10 May 2013, 02:14 PM
Hello Qakmak,

Thank you for writing.

From your question I am guessing that you are doing the things correctly as far as the code is concerned. Perhaps the issue might be from the settings in your theme. Would you please confirm that you are setting the margin for the main state of the element? The way your question sounds seems that you are setting it at the MouseOver or MouseHover state. If that is the case, please change the settings and the things should be alright.

I am attaching an image which will help you see exactly what I am talking about.

If you confirm that you are setting the margin at the right place, would you send me the tssp file in order to check what might be the problem.

Hope that helps, Please do not hesitate to contact us in case you face other issues.

Kind regards,
Paul
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
0
Qakmak
Top achievements
Rank 1
answered on 11 May 2013, 08:32 AM
thanks your helping me , you're right. I'm use mouse over, not button element. my mistake. thanks.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Qakmak
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Qakmak
Top achievements
Rank 1
Paul
Telerik team
Share this question
or