Hi,
I am creating a wpf application with MVVM pattern. The application has a radscheduleview component with context menu attached to it. When user select the "Delete Note" menu item, how can I get all selected appointments into the list which I can then go through, and do desired manipulations to each appointment?
Currently I have a command which delete one appointment at a time. A new requirement is deletion of all selected appointments. Any ideas?
public RelayCommand<CustomAppointment> DeleteNoteCommand
{
get
{
return deleteNoteCommand
?? (deleteNoteCommand = new RelayCommand<CustomAppointment>(
p =>
{
if (p != null)
{
var message = new DialogMessage("Delete Note?", DeleteNoteCallback)
{
Button = MessageBoxButton.OKCancel,
Caption = "Delete Note",
Icon = MessageBoxImage.Warning
};
deletedNote = p; // global variable to send selected item to messenger
Messenger.Default.Send(message);
}
},
p => (p != null) && (p.Source == NOTE));
}
}
I am creating a wpf application with MVVM pattern. The application has a radscheduleview component with context menu attached to it. When user select the "Delete Note" menu item, how can I get all selected appointments into the list which I can then go through, and do desired manipulations to each appointment?
Currently I have a command which delete one appointment at a time. A new requirement is deletion of all selected appointments. Any ideas?
public RelayCommand<CustomAppointment> DeleteNoteCommand
{
get
{
return deleteNoteCommand
?? (deleteNoteCommand = new RelayCommand<CustomAppointment>(
p =>
{
if (p != null)
{
var message = new DialogMessage("Delete Note?", DeleteNoteCallback)
{
Button = MessageBoxButton.OKCancel,
Caption = "Delete Note",
Icon = MessageBoxImage.Warning
};
deletedNote = p; // global variable to send selected item to messenger
Messenger.Default.Send(message);
}
},
p => (p != null) && (p.Source == NOTE));
}
}