public static UserControl GetDetailedAttachmentPanelView(AttachmentPanelDecoratorBase_NonGeneric attachmentDecorator) { if (attachmentDecorator is NotePanelDecorator) { return(new AttachmentPanelView { DataContext = attachmentDecorator }); } if (attachmentDecorator is PhotoPanelDecorator) { return(new AttachmentPanelView { DataContext = attachmentDecorator, TopSpecificContentTemplate = (DataTemplate)Application.Current.Resources[SpecificPhotoTemplate_Detailed] }); } if (attachmentDecorator is PhotoAlbumPanelDecorator photoAlbumDecorator) { return(new AttachmentPanelView { DataContext = attachmentDecorator, //DataContext = photoAlbumDecorator.EditableAttachmentViewModel, BottomSpecificContentTemplate = (DataTemplate)Application.Current.Resources[PhotoAlbumSpecificContentTemplate_Detailed] }); } throw new NotImplementedException(); }
private static void CancelDetailingAttachmentImpl(AttachmentPanelDecoratorBase_NonGeneric decorator) { EventCancelDetailingAttachment(decorator); }
private static void CancelEditAttachmentImpl(AttachmentPanelDecoratorBase_NonGeneric decorator) { decorator.CommandCancelEdit.Execute(); }
private void ClientCommands_OnCancelDetailingAttachment(AttachmentPanelDecoratorBase_NonGeneric decorator) { UIElement detailedView = FindDetailedAttachmentView(); RemoveCreationView(detailedView); }