Problem with load package file

5 posts, 1 answers
  1. Qakmak
    Qakmak avatar
    20 posts
    Member since:
    Apr 2013

    Posted 08 May 2013 Link to this post

    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)
  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 08 May 2013 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Qakmak
    Qakmak avatar
    20 posts
    Member since:
    Apr 2013

    Posted 09 May 2013 Link to this post

    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.
  5. Answer
    Paul
    Admin
    Paul avatar
    60 posts

    Posted 10 May 2013 Link to this post

    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.
  6. Qakmak
    Qakmak avatar
    20 posts
    Member since:
    Apr 2013

    Posted 11 May 2013 Link to this post

    thanks your helping me , you're right. I'm use mouse over, not button element. my mistake. thanks.
Back to Top
UI for WinForms is Visual Studio 2017 Ready