static object OnCoerceValueContentProperty(DependencyObject d, object baseValue)
        {
            DocumentFloatingWindow fl = ((DocumentFloatingWindow)d);

            if (fl.Content != null)
            {
                throw new InvalidOperationException("Content on floating windows can't be set more than one time.");
            }

            if (!(baseValue is DocumentContent))
            {
                throw new InvalidOperationException("Content must be of type DocumentContent");
            }

            FloatingDocumentPane paneToReturn = null;

            if (baseValue is DocumentContent)
            {
                paneToReturn = new FloatingDocumentPane(fl, baseValue as DocumentContent);
            }

            return(paneToReturn);
        }
Beispiel #2
0
 internal FloatingDocumentPane(DocumentFloatingWindow floatingWindow, DocumentContent documentToTransfer)
 {
     _floatingWindow     = floatingWindow;
     _documentToTransfer = documentToTransfer;
 }