예제 #1
0
        static object OnCoerceValueContentProperty(DependencyObject d, object baseValue)
        {
            DockableFloatingWindow fl = ((DockableFloatingWindow)d);

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

            if (!(baseValue is DockableContent) &&
                !(baseValue is DockablePane))
            {
                throw new InvalidOperationException("Content must be of type DockableContent or DockablePane");
            }

            FloatingDockablePane paneToReturn = null;

            if (baseValue is DockableContent)
            {
                paneToReturn = new FloatingDockablePane(fl, baseValue as DockableContent);
            }
            else if (baseValue is DockablePane)
            {
                paneToReturn = new FloatingDockablePane(fl, baseValue as DockablePane);
            }

            return(paneToReturn);
        }
예제 #2
0
 internal FloatingDockablePane(DockableFloatingWindow floatingWindow, DockableContent contentToTransfer)
 {
     _floatingWindow    = floatingWindow;
     _contentToTransfer = contentToTransfer;
 }
예제 #3
0
 internal FloatingDockablePane(DockableFloatingWindow floatingWindow, DockablePane paneToTransfer)
 {
     _floatingWindow = floatingWindow;
     _paneToTransfer = paneToTransfer;
 }