You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've created a new project from the vs2013Test project. Next, I changed the tools to be Lazy loaded when the corresponding View item was selected. Once the view item has been selected for the first time (i.e. going from a non-checked state to a checked state), I would then create the corresponding tool and add it to the tool collection, and then set the tool's IsVisible to true.
Note: ToolViewModel's _isVisible = true; to false;
Tools.Add(new XxxxToolViewModel())
The LayoutInitializer.BeforeInsertAnchorable is called.
The layout code changes the Tool's IsVisible property from false to true
The PanesStyleSelector.SelectStyle is called.
But the PanesTemplateSelector.SelectTemplate is not called. And thus, the tool window isn't displayed.
Set tool.IsVisible = true;
Notice the tool window isn't visible on the screen.
Now, using the View menu, try hiding and showing the tool gain. Still, nothing shows up.
In other words:
Adding an invisible tool window doesn't work.
Work-a-round:
Ensure the tool's IsVisible is set to true before adding the tool to the Tool Collection. But I suspect this issue is a symptom of a more significant issue.
The text was updated successfully, but these errors were encountered:
kabua
changed the title
Bug 5 - Adding Dynamic Tools
Bug #5 - Adding Dynamic Tools
Oct 4, 2022
I've created a new project from the vs2013Test project. Next, I changed the tools to be Lazy loaded when the corresponding View item was selected. Once the view item has been selected for the first time (i.e. going from a non-checked state to a checked state), I would then create the corresponding tool and add it to the tool collection, and then set the tool's IsVisible to true.
Note: ToolViewModel's
_isVisible = true;
tofalse;
LayoutInitializer.BeforeInsertAnchorable
is called.false
totrue
PanesStyleSelector.SelectStyle
is called.PanesTemplateSelector.SelectTemplate
is not called. And thus, the tool window isn't displayed.In other words:
Adding an invisible tool window doesn't work.
Work-a-round:
Ensure the tool's IsVisible is set to true before adding the tool to the Tool Collection. But I suspect this issue is a symptom of a more significant issue.
The text was updated successfully, but these errors were encountered: