6 Answers, 1 is accepted
0
Hello Javier,
You can easily customize the RadConfirm dialog using Expression Blend. You need the RadConfirmStyle and RadWindowStyle.
Follow these steps:
- Drag a RadWindow onto the design area in Expression Blend
- Generate the template for RadWindow by right-clicking on the control > Edit Template > Edit a Copy
- Make your customizations upon that template (removing window elements, changing colors, etc.)
- You do not need the window now, you can delete it
- Drag a dummy RadConfirm control onto the design area
- Generate its template
- Make your customizations upon the template (bigger buttons, etc.)
- You can delete the RadConfirm control
Use both of the generated style when you create your instance of RadConfirm dialog in a similar manner:
I hope this helps. If you need assistance on accomplishing this task, please let me know.
All the best,
Dani
the Telerik team
You can easily customize the RadConfirm dialog using Expression Blend. You need the RadConfirmStyle and RadWindowStyle.
Follow these steps:
- Drag a RadWindow onto the design area in Expression Blend
- Generate the template for RadWindow by right-clicking on the control > Edit Template > Edit a Copy
- Make your customizations upon that template (removing window elements, changing colors, etc.)
- You do not need the window now, you can delete it
- Drag a dummy RadConfirm control onto the design area
- Generate its template
- Make your customizations upon the template (bigger buttons, etc.)
- You can delete the RadConfirm control
Use both of the generated style when you create your instance of RadConfirm dialog in a similar manner:
private
void
Window_Loaded(
object
sender, RoutedEventArgs e)
{
RadWindow.Confirm(
new
DialogParameters()
{
Content =
"Save changes?"
,
WindowStyle = Application.Current.Resources[
"RadWindowStyle"
]
as
Style,
ContentStyle = Application.Current.Resources[
"RadConfirmStyle"
]
as
Style,
});
}
I hope this helps. If you need assistance on accomplishing this task, please let me know.
All the best,
Dani
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
![](/forums/images/avatarimages/default.gif)
javier
Top achievements
Rank 1
answered on 20 Apr 2011, 01:08 PM
Sorry but i don't use expression blend and i can't use it (work policy), so I work directly with the xaml file in the visual studio 2010 and it's a little complicated to generate the style without visualy see it.
It is common to see in the forums custom solutions that people from support reply to some specific needs (great work by the way)
so i imagine that you can send me an simple solution with a custom template that have something like i need, so i can modified the values to achieve my task.
excuse me if thats no possible.
thank you and greetings,
It is common to see in the forums custom solutions that people from support reply to some specific needs (great work by the way)
so i imagine that you can send me an simple solution with a custom template that have something like i need, so i can modified the values to achieve my task.
excuse me if thats no possible.
thank you and greetings,
0
Hello Javier,
I prepared a sample as per the guidelines posted in my first reply. Attached you can find a customized RadConfirm dialog with hidden header and borders. You can apply your own customizations on the two styles you will find in App.xaml.
I hope this will be helpful.
All the best,
Dani
the Telerik team
I prepared a sample as per the guidelines posted in my first reply. Attached you can find a customized RadConfirm dialog with hidden header and borders. You can apply your own customizations on the two styles you will find in App.xaml.
I hope this will be helpful.
All the best,
Dani
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
![](/forums/images/avatarimages/default.gif)
javier
Top achievements
Rank 1
answered on 28 Apr 2011, 01:25 PM
thanks
0
![](/forums/images/avatarimages/default.gif)
Dorin
Top achievements
Rank 1
answered on 26 Jun 2012, 08:06 AM
And how can we change the width inside the radwindow in order that the content to be stretched to the radwindow. In this moment it seems to be centered. I hope you understand what i want to achieve. Thank you !
All i changed in your code was:
- added a textblock (with width=700) on the content property instead of "Save changes?";
- added <Setter Property="Width" Value="1200"/> to the RadWindowStyle in app.xaml
Now the content of radwindow is centered ( the horizontalScrollBar appears), and i want to stretch it to the radwindow width.
----------------------------------------
I did find the solution eventually. I just added <Setter Property="MaxWidth" Value="9000"/> to the RadWindowStyle in app.xaml.
Cant explain why it works now.... Wasn't that property Auto? Shouldn't that work without the maxwidth?
All i changed in your code was:
- added a textblock (with width=700) on the content property instead of "Save changes?";
- added <Setter Property="Width" Value="1200"/> to the RadWindowStyle in app.xaml
Now the content of radwindow is centered ( the horizontalScrollBar appears), and i want to stretch it to the radwindow width.
----------------------------------------
I did find the solution eventually. I just added <Setter Property="MaxWidth" Value="9000"/> to the RadWindowStyle in app.xaml.
Cant explain why it works now.... Wasn't that property Auto? Shouldn't that work without the maxwidth?
0
Hello Dorin,
It is the MinWidth and MaxWidth properties of the RadConfirmStyle that prevent it from stretching. If your RadWindow is 1200px in Width, you can change MinWidth in RadConfirmStyle to 1100, for example, and remove the MaxWidth Setter.
Also, when using a TextBlock as content for the dialog, if you do not wish the horizontal ScrollBar to appear, you have to let the TextBlock wrap. To allow text-wrapping you have to set a fixed width to the TextBlock. For example, 1000px.
So all it takes is just to keep the MinWidth and the TextBlock width in accordance with the RadWindow width.
Hope this helps.
All the best,
Dani
the Telerik team
It is the MinWidth and MaxWidth properties of the RadConfirmStyle that prevent it from stretching. If your RadWindow is 1200px in Width, you can change MinWidth in RadConfirmStyle to 1100, for example, and remove the MaxWidth Setter.
Also, when using a TextBlock as content for the dialog, if you do not wish the horizontal ScrollBar to appear, you have to let the TextBlock wrap. To allow text-wrapping you have to set a fixed width to the TextBlock. For example, 1000px.
So all it takes is just to keep the MinWidth and the TextBlock width in accordance with the RadWindow width.
Hope this helps.
All the best,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>