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

Change RadPane's Style Programmatically

3 Answers 104 Views
Docking
This is a migrated thread and some comments may be shown as answers.
bydt
Top achievements
Rank 1
bydt asked on 25 Oct 2010, 06:32 AM
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.

3 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 25 Oct 2010, 12:25 PM
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
0
bydt
Top achievements
Rank 1
answered on 26 Oct 2010, 03:10 AM
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
0
Konstantina
Telerik team
answered on 28 Oct 2010, 08:09 AM
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
Tags
Docking
Asked by
bydt
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
bydt
Top achievements
Rank 1
Share this question
or