Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #5 - Adding Dynamic Tools #382

Closed
kabua opened this issue Oct 4, 2022 · 0 comments
Closed

Bug #5 - Adding Dynamic Tools #382

kabua opened this issue Oct 4, 2022 · 0 comments

Comments

@kabua
Copy link

kabua commented 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; to false;

  1. Tools.Add(new XxxxToolViewModel())
  2. The LayoutInitializer.BeforeInsertAnchorable is called.
  3. The layout code changes the Tool's IsVisible property from false to true
  4. The PanesStyleSelector.SelectStyle is called.
  5. But the PanesTemplateSelector.SelectTemplate is not called. And thus, the tool window isn't displayed.
  6. Set tool.IsVisible = true;
  7. Notice the tool window isn't visible on the screen.
  8. 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.

@kabua kabua changed the title Bug 5 - Adding Dynamic Tools Bug #5 - Adding Dynamic Tools Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants