问题
So I have been working on a project using C Sharp and WPF for a while now, and now recently several of my user controls are hidden in Expression Blend. I tried show all, setting visibility to Visible in the gui, cleaning the project build, rebuilding, restarting, etc... nothing seems to work.
As you can imagine, this is very frustrating, and any help would be greatly appreciated, thank you.
回答1:
Figured out a way around it. The problem is somehow related to the fact that I have several UserControls extended from a class that extends UserControl, but which has no XAML file itself.
Changing the xaml root from something like MyCustomUserControl temporarily to UserControl will allow the content to appear. Once done editing, change the root back so your program can run.
来源:https://stackoverflow.com/questions/3700129/expression-blend-forcing-user-controls-to-be-hidden