コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: ClientCommands.cs プロジェクト: Laxale/TwinSovet
 private static void CancelDetailingAttachmentImpl(AttachmentPanelDecoratorBase_NonGeneric decorator)
 {
     EventCancelDetailingAttachment(decorator);
 }
コード例 #3
0
ファイル: ClientCommands.cs プロジェクト: Laxale/TwinSovet
 private static void CancelEditAttachmentImpl(AttachmentPanelDecoratorBase_NonGeneric decorator)
 {
     decorator.CommandCancelEdit.Execute();
 }
コード例 #4
0
        private void ClientCommands_OnCancelDetailingAttachment(AttachmentPanelDecoratorBase_NonGeneric decorator)
        {
            UIElement detailedView = FindDetailedAttachmentView();

            RemoveCreationView(detailedView);
        }