I know that it may be a bit late to answer, but it will probably help others in the future.
About a week ago I ran into the same problem. It turned out that I was trying to get the DesignerView, while I was still in the UserControl initialization code that contained the restored WorkflowDesigner.
WorkflowDesigner, GetService Loaded DesignerView:
public partial class MyDesignerControl : UserControl
{
private WorkflowDesigner wd;
private string workflowFilePathName;
protected override void OnInitialized(EventArgs e) {
base.OnInitialized();
wd = new WorkflowDesigner();
wd.Load(workflowFilePathName);
workflowDesignerPanel.Content = wd.View;
}
private void MyDesignerControl_Loaded(object sender, RoutedEventArgs e) {
var designerView = wd.Context.Services.GetService<DesignerView>();
if (designerView != null) {
designerView.WorkflowShellBarItemVisibility =
ShellBarItemVisibility.MiniMap |
ShellBarItemVisibility.Zoom;
}
}
...
}
DesignerView, WorkflowShellBarItemVisibility .
( : XAML):
<UserControl x:Class="My.Namespace.Here.MyDesignerControl"
...
Loaded="MyDesignerControl_Loaded">