wpftoolkit icon indicating copy to clipboard operation
wpftoolkit copied to clipboard

How can I set Border.CornerRadius for my MessageBox?

Open phsoz opened this issue 3 years ago • 3 comments

How can I set Border.CornerRadius for my MessageBox?

phsoz avatar Oct 15 '21 11:10 phsoz

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

XceedBoucherS avatar Oct 22 '21 19:10 XceedBoucherS

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?

BlyZeDev avatar Jun 08 '23 16:06 BlyZeDev

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.

XceedBoucherS avatar Jun 09 '23 12:06 XceedBoucherS