DialogMessage

Jan 12, 2011 at 10:29 AM

hi, im trying to use the mvvmlight DialogMessage.

var message = new DialogMessage(
            "Confirm Delete", RemoveAddressAction)
            { 
                Button = MessageBoxButton.OKCancel, 
                Caption = "Caption??" 
            };

VS2010 undelines the "Button = MessageBoxButton.OKCancel" line complaining about

"Cannot convert source type 'System.Windows.MessageBoxButton [PresentationFramework, Version=3.0.0.0, Culture...] to target type 'System.Windows.MessageBoxItem [GalaSoft.MvvmLight, Version=3.0.0.29216, ...]

And a similar issue on the code behind on the view when I try to use the DialogMessage to show the messagebox.

Has anyone encountered this before? I have no clue how to fix it.

Thanks

Coordinator
Jan 12, 2011 at 11:21 AM

Hi,

Which version of the toolkit are you using (Silverlight, WPF, WP7)?

Cheers,

Laurent

Jan 12, 2011 at 11:22 AM

Hi, im using WPF.

thanks.

Steve.

Coordinator
Jan 12, 2011 at 12:11 PM

Hi,

Quick test here works fine (WPF4, SL4). Please email me your address to get the code sample.

Thanks,

Laurent

Jan 12, 2011 at 12:16 PM

Laurent, 

My project is WPF 3.5, does DialogMessage only work with 4?

email sent.