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

Change the style of the generated buttons

2 Answers 29 Views
MessageBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marcello
Top achievements
Rank 1
Marcello asked on 29 May 2013, 03:03 PM
Hi,
i'm trying to completely restyle the messageBox using the ControlTemplate (ImageTemplate in examples) as a starting point.
What i'm trying to achieve is to change, other than the style of the box and the other elements inside, also the design of the generated buttons. (the ones that are inside the stackpanel "PART_ButtonsPanel").
I need to do that because the background that i'm now using for the MessageBox is almost white, and the buttons are barely visible.
How can i do that?
This is the actual Template portion related to the ButtonsContainer:

<ContentControl Grid.Row="3" x:Name="PART_ButtonsContainer" HorizontalContentAlignment="Stretch" Foreground="#FF0D375A" Grid.ColumnSpan="2">
                  <ContentControl.ContentTemplate>
                      <DataTemplate>
                          <StackPanel x:Name="PART_ButtonsPanel" Orientation="Horizontal"></StackPanel>
                      </DataTemplate>
                  </ContentControl.ContentTemplate>
              </ContentControl>

Many thanks in advance

Marcello

2 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 03 Jun 2013, 08:24 AM
Hi Marcello,

Thanks for writing.
Since the stack panel contains the buttons, you can put an implicit style in the stack panel resources that targets the Button type. This should override the default styles with your settings.

Regards,
Victor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Marcello
Top achievements
Rank 1
answered on 03 Jun 2013, 11:18 AM
Thank you very much.
That's exactly what i was looking for!!!


PS:(Do i have to mark this thread as solved somewhere?)
Tags
MessageBox
Asked by
Marcello
Top achievements
Rank 1
Answers by
Victor
Telerik team
Marcello
Top achievements
Rank 1
Share this question
or