This question is locked. New answers and comments are not allowed.
Hello,
I'm using the MessageBox control and I need to display a list of choices to my users. In my case, I need each button to be a simple text. In order to do that, I've come up with the following XAML:
The problem is that the
Am I missing something ? I've also tried to set the resources in the Resources section of the ContentControl but it doesn't work either.
Regards,
Jeremy
I'm using the MessageBox control and I need to display a list of choices to my users. In my case, I need each button to be a simple text. In order to do that, I've come up with the following XAML:
<
ControlTemplate
x:Key
=
"shareMessageBoxTemplate"
TargetType
=
"telerik:RadMessageBoxControl"
>
<
Border
Padding
=
"12"
Background
=
"{StaticResource PhoneChromeBrush}"
>
<
Border.Resources
>
<
Style
TargetType
=
"Button"
>
<
Style.Setters
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"Button"
>
<
TextBlock
Margin
=
"14"
Text
=
"{TemplateBinding Content}"
FontSize
=
"30"
FontWeight
=
"ExtraLight"
/>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style.Setters
>
</
Style
>
</
Border.Resources
>
<
Grid
>
<
ContentControl
x:Name
=
"PART_Title"
Visibility
=
"Collapsed"
/>
<
ContentControl
x:Name
=
"PART_Message"
Visibility
=
"Collapsed"
/>
<
CheckBox
x:Name
=
"PART_CheckBox"
Visibility
=
"Collapsed"
/>
<
ContentControl
x:Name
=
"PART_ButtonsContainer"
HorizontalContentAlignment
=
"Stretch"
>
<
ContentControl.ContentTemplate
>
<
DataTemplate
>
<
StackPanel
x:Name
=
"PART_ButtonsPanel"
/>
</
DataTemplate
>
</
ContentControl.ContentTemplate
>
</
ContentControl
>
</
Grid
>
</
Border
>
The problem is that the
FontWeight="ExtraLight"option does not seems to be taken into account (the text is still rendered using a bold style).
Am I missing something ? I've also tried to set the resources in the Resources section of the ContentControl but it doesn't work either.
Regards,
Jeremy