wpftoolkit
wpftoolkit copied to clipboard
How can I set Border.CornerRadius for my MessageBox?
How can I set Border.CornerRadius for my MessageBox?
Hi,
currently, you can't....unless you modify the default templates.
If you go in file -Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/WindowControl.xaml (for Windows 8 an up) -Xceed.Wpf.Toolkit/Primitives/Themes/Generic/WindowControl.xaml (for other Windows) and set a CornerRadius of 5 to "PART_WindowRoot" and "ContentBorder". This will set a cornerRadius to the Window
Then, go in file: -Xceed.Wpf.Toolkit/MessageBox/Themes/Aero2.NormalColors.xaml (for Windows 8 an up) -Xceed.Wpf.Toolkit/MessageBox/Themes/Generic.xaml (for others Windows) and for the Border with (Background="{TemplateBinding ButtonRegionBackground}"), add: CornerRadius="0,0,5,5" This will set a CornerRadius to the ButtonRegion inside the Window.
Thank you
Hi,
currently, you can't....unless you modify the default templates.
If you go in file -Xceed.Wpf.Toolkit/Primitives/Themes/Aero2/WindowControl.xaml (for Windows 8 an up) -Xceed.Wpf.Toolkit/Primitives/Themes/Generic/WindowControl.xaml (for other Windows) and set a CornerRadius of 5 to "PART_WindowRoot" and "ContentBorder". This will set a cornerRadius to the Window
Then, go in file: -Xceed.Wpf.Toolkit/MessageBox/Themes/Aero2.NormalColors.xaml (for Windows 8 an up) -Xceed.Wpf.Toolkit/MessageBox/Themes/Generic.xaml (for others Windows) and for the Border with (Background="{TemplateBinding ButtonRegionBackground}"), add: CornerRadius="0,0,5,5" This will set a CornerRadius to the ButtonRegion inside the Window.
Thank you
How can I open these files in my project when I use the NuGet package?
Hi @BlyZeYT , You can't do the changes with a NuGet package.
You will have to remove the NuGet package from your app, download the code from GitHub (https://github.com/xceedsoftware/wpftoolkit), make the modifications, compile it and then reference those updated dlls.
Thank you.