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

The type 'Window' does not support direct content #1048

Closed
lennoncork opened this issue Jan 6, 2016 · 6 comments
Closed

The type 'Window' does not support direct content #1048

lennoncork opened this issue Jan 6, 2016 · 6 comments
Labels
Milestone

Comments

@lennoncork
Copy link

I'm using visual studio 2015 to develop a basic IronPython WPF project. The XAML window shows the error "the type 'Window' does not support direct content", similar to the unrelated issue reported here http://stackoverflow.com/questions/33805234/the-type-window-does-not-support-direct-content.

Previously the issue didn't exist, and I believe it only occurred after updating to VS2015 Update 1 and Python Tools 2.2.

I can repeat this by creating a new IronPython WPF project with no additional content (image attached).

I can also fix the issue, temporarily, by adding a reference to "System.Xml". The reference can then be removed, but the warning will return when the project is loaded again.

capture

@NetworkActiv
Copy link

For me, adding System.Xaml (note the 'a') solves the problem properly. Adding any other reference seems to solve it only temporarily.

@lennoncork
Copy link
Author

Perfect, that works for me as well! I had to reload the application, but all is well! Thank you!

@NetworkActiv
Copy link

Since this approach seems to work, someone should probably make it to where new PTVS WPF projects include the System.Xaml reference by default. It appears that C# WPF projects include this reference by default. I am not sufficiently familiar with this repository to know where in the code this would be done.

@samwhaleIV
Copy link

This is still happening. Even with the error the project can still be built/run, though.

@zooba
Copy link
Member

zooba commented Feb 1, 2016

We haven't released anything in the last 22 days, that's why it's still happening :)

Our next update will have a fixed template. The fix for existing projects is to add the System.Xaml reference.

@zooba zooba added this to the 2.2.3 milestone Feb 1, 2016
@zooba zooba closed this as completed Feb 1, 2016
@JohnnyDeeee
Copy link

Somehow i cant fix this problem with adding the "System.Xaml" reference..

8680954c78d54b581ba3711d20f72f31

I'm not sure if it is because im using the "MahApps.Metro" plugin
or
because i'm using 2 projects within one solution...

330c85df442b2a175ab8ea92c1d92e06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants