Change RadPane's Style Programmatically

4 posts, 0 answers
  1. bydt
    bydt avatar
    7 posts
    Member since:
    May 2010

    Posted 25 Oct 2010 Link to this post

    Hi,

    I'd like to change the close button on the RadPane to IE8/Chrome Look-alike. I've had changed the style as the following link below :
    http://www.telerik.com/community/forums/silverlight/docking/how-to-move-the-close-button-into-tab-header.aspx

    however, this solution works if we create the radpane on xaml. Unfortunately, my project creates the radpane programmatically so could not be able to get the style, which is the close button doesnt appear on the pane-header.

    can i apply the style to move close button to the header instead on the right side window (default) programmatically?

    here is my code behind :

    public MainPage()
            {
                InitializeComponent();
                myRadPaneGroup.AddItem(new RadDocumentPane()
                {
                    Content = "XXXXX",
                    CanFloat = false,
                    Header = "Header test",
                    Margin = new Thickness(0, 2, 0, 0)
                },
                       DockPosition.Center);
            }


    thanks in advance.
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 25 Oct 2010 Link to this post

    Hello,

    Thank you for the screenshot and the code snippet.

    The changed style is for the RadPane, not for the RadDocumentPane. So, to make it work you will have to create a RadPane:

    public MainPage()
          {
              InitializeComponent();
              myRadPaneGroup.AddItem(new RadPane()
              {
                  Content = "XXXXX",
                  CanFloat = false,
                  Header = "Header test",
                  Margin = new Thickness(0, 2, 0, 0)
              },
                     DockPosition.Center);
          }

    Hope this helps. If you have any other questions please let us know.

    Sincerely yours,
    Konstantina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. bydt
    bydt avatar
    7 posts
    Member since:
    May 2010

    Posted 25 Oct 2010 Link to this post

    Hi Konstantina,

    thank you so much, it work like a charm :)

    how to be applied in other themes e.g vista,summer etc. except the default themes?



    regards.

    Bayudita
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 28 Oct 2010 Link to this post

    Hi Bayudita,

    Thank you for your question.

    To apply different themes you will need to first edit them like the default one. If you follow the steps which Dani has listed in the other post you should be able to achieve the same effect with the other themes.

    If you have any other questions about our controls please feel free to contact us again.

    Greetings,
    Konstantina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top