Hi
How to apply the défault application theme to the "Conditional Formating" windows who is displayed for end users ?
(In my application, I use the Dersert Theme, so when this windows is showed, the blue color is not welcome.)
Thanks
Anthony
How to apply the défault application theme to the "Conditional Formating" windows who is displayed for end users ?
(In my application, I use the Dersert Theme, so when this windows is showed, the blue color is not welcome.)
Thanks
Anthony
7 Answers, 1 is accepted
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 04 Dec 2010, 09:58 AM
Helo Anthony,
This will happen automatically if you set the application theme name for the entire application.
(See screenshot)
Hope that helps
Richard
This will happen automatically if you set the application theme name for the entire application.
ThemeResolutionService.ApplicationThemeName =
"Desert"
(See screenshot)
Hope that helps
Richard
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 04 Dec 2010, 11:51 AM
Hello guys,
Or if you are using different themes in your application and just want to show the ConditionalFormattingForm with a different theme, you can just do the following:
And to use this from the grids's ContextMenu, you can just use the following:
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
Or if you are using different themes in your application and just want to show the ConditionalFormattingForm with a different theme, you can just do the following:
var conditionalFormattingForm =
new
ConditionalFormattingForm(
this
.radGridView1.MasterTemplate,
null
);
conditionalFormattingForm.ThemeName =
"Desert"
;
conditionalFormattingForm.Owner =
this
.FindForm();
conditionalFormattingForm.Show();
And to use this from the grids's ContextMenu, you can just use the following:
//register for the context menu opening event
radGridView1.ContextMenuOpening +=
new
ContextMenuOpeningEventHandler(radGridView1_ContextMenuOpening);
void
radGridView1_ContextMenuOpening(
object
sender, ContextMenuOpeningEventArgs e)
{
var conditionalFormattingItem =
e.ContextMenu.Items.Where(i => i.Text.Contains(
"Conditional"
)).FirstOrDefault();
if
(conditionalFormattingItem ==
null
)
{
return
;
}
var index = e.ContextMenu.Items.IndexOf(conditionalFormattingItem);
e.ContextMenu.Items.RemoveAt(index);
conditionalFormattingItem =
new
RadMenuItem(conditionalFormattingItem.Text);
e.ContextMenu.Items.Insert(index, conditionalFormattingItem);
conditionalFormattingItem.Click +=
this
.conditionalFormattingItem_Click;
}
void
conditionalFormattingItem_Click(
object
sender, EventArgs e)
{
var conditionalFormattingForm =
new
ConditionalFormattingForm(
this
.radGridView1.MasterTemplate,
null
);
conditionalFormattingForm.ThemeName =
"Desert"
;
conditionalFormattingForm.Owner =
this
.FindForm();
conditionalFormattingForm.Show();
}
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP
0
Filleau
Top achievements
Rank 1
answered on 04 Dec 2010, 12:50 PM
Thanks all !
Perfect !
Perfect !
0
Filleau
Top achievements
Rank 1
answered on 08 Dec 2010, 05:02 PM
Hi again, me again...
What's about system dialog box ?
I need to open an savedialogbox. If I wan't a to apply a theme on it I need to rewrite it ?
What's about system dialog box ?
I need to open an savedialogbox. If I wan't a to apply a theme on it I need to rewrite it ?
0
Richard Slade
Top achievements
Rank 2
answered on 08 Dec 2010, 05:22 PM
Hello,
the Windows Save Dialog box is still a windows form control and therefore you would have to look at implementing your own as this cannot be styled as far as Im aware.
Richard
the Windows Save Dialog box is still a windows form control and therefore you would have to look at implementing your own as this cannot be styled as far as Im aware.
Richard
0
Filleau
Top achievements
Rank 1
answered on 08 Dec 2010, 05:54 PM
Thanks.
But I can imagine that it must be already exist a code to do that.... somewhere.
But I can imagine that it must be already exist a code to do that.... somewhere.
0
Richard Slade
Top achievements
Rank 2
answered on 08 Dec 2010, 06:02 PM