Blend 5 Preview - Where did WPFSceneViewer.ViewMode go?
-
Wednesday, October 17, 2012 2:23 PM
Hello,
I created a Blend 4 extension that allowed me to switch the view mode (Code/Designer/Split) in Blend via a hot-key. My old method retrieved the WpfSceneView then set the ViewMode property to whatever was desired. Today I upgraded to the Blend 5 Preview for my WPF work but my extension no longer works. I'm attempting to rebuild against the Blend 5 Preview "Extension" DLLs but the WPFSceneView object no longer has a ViewMode property, also the old ViewMode enumeration appears to no longer exist. Can anyone point me to where the corresponding objects/behavior now resides? Thanks!
Jason
All Replies
-
Wednesday, October 17, 2012 6:24 PMModerator
Quite a bit of the behind the scenes structure of Blend has been changed to accommodate out of process support, which is used for the Windows 8 XAML designer and also for hosting inside VS.
I'm not sure if there is a supported extensibility point for this functionality.
-
Thursday, October 18, 2012 1:40 PMThanks for the reply. It definitely wasn't what I was hoping for but I won't waste any more time trying to find a mechanism that doesn't exist.
-
Thursday, November 29, 2012 3:39 AM
After digging a little further I found what I was after. For anyone writing extensions for Blend 5 Preview you can access/update the view mode by casting ViewService.ActiveView as a MarkupSplitView then simply set the ViewMode property on the MarkupSplitView.
To update text in the XAML editor (to do something crazy like comment/uncomment XAML) simply grab the ITextEditor object off of the MarkupSplitView which appears to be nearly unchanged from Blend 4. Thanks,
- Marked As Answer by junruh82 Thursday, November 29, 2012 3:39 AM

