Quantcast
Viewing all articles
Browse latest Browse all 4964

New Post: MessageBox ImageSource

I am trying to change the main image (ImageSource) for a MessageBox to show a custom icon.

I have the following...
Style messageBoxStyle = new Style(typeof(Xceed.Wpf.Toolkit.MessageBox));
messageBoxStyle.Setters.Add(new Setter(Xceed.Wpf.Toolkit.MessageBox.ImageSourceProperty, new BitmapImage(new Uri("/Resources/Printer.png", UriKind.Relative))));

MessageBoxResult result = Xceed.Wpf.Toolkit.MessageBox.Show(Window.GetWindow(this.AssociatedObject), @"Caption", @"Text", MessageBoxButton.YesNo, MessageBoxImage.None, messageBoxStyle);
However, when I run the code the image I have set is not displayed.

I have also tried the override where you do not specify a MessageBoxImage at all, this too results in my custom image not being displayed.

Any help?

Thanks.

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>