WPF Designer

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
User avatar
TooTallTommyT
Posts: 19
Joined: Tue Aug 21, 2018 6:51 am
Location: Las Vegas, NV

WPF Designer

Postby TooTallTommyT » Tue May 14, 2019 7:24 am

I was hoping that the general forum would come up with some answers, but nothing so far, so...

I've upgrade to the latest versions and I still get (even a brand new project) an "Invalid Markup" on my designer window. If hover over either of the two controls in the xaml page, textblock or textbox, I get a hover message: "Textblock is not supported in a Windows Presentation Foundation (WPF) project."

Any idea when this might finally get fixed. It's hard to design a screen if I can't see what I'm doing.

Thanks
It ain't easy being green!

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: WPF Designer

Postby JS-Support @Userware » Thu May 16, 2019 5:38 am

Hi,

I believe that in v2.0 Preview 0.4 the XAML Preview is working only in some specific case (that is, if version 1.x is installed AND you are using VS 2015 or 2017). We are working to fix the XAML Preview in version 2.x.

However, you should not be getting errors in the XAML Text Editor. Could you please post a screenshot showing the design-time errors?

Thanks

User avatar
TooTallTommyT
Posts: 19
Joined: Tue Aug 21, 2018 6:51 am
Location: Las Vegas, NV

Re: WPF Designer

Postby TooTallTommyT » Fri May 17, 2019 3:58 am

This screen shot is just after creating a brand new project in VS2017, and compiling.

Xaml Editor Errors.PNG
Xaml Editor Errors.PNG (192.1 KiB) Viewed 23488 times
It ain't easy being green!

Username
Posts: 2
Joined: Wed May 15, 2019 10:46 am

Re: WPF Designer

Postby Username » Fri May 17, 2019 4:23 am

I'm having that error too when I just create a new empty project without touch in 1 line of code... I'm using VS2019

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: WPF Designer

Postby JS-Support @Userware » Fri May 17, 2019 5:19 am

Thanks. We are looking into this. We'll keep you updated asap.

Username
Posts: 2
Joined: Wed May 15, 2019 10:46 am

Re: WPF Designer

Postby Username » Mon May 20, 2019 7:17 am

News?

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: WPF Designer

Postby JS-Support @Userware » Mon May 20, 2019 11:55 pm

It's due to the fact that v2.0 Preview 0.5 does not come with the XAML Editor yet (this is listed in the "known issues" section of the release notes of v2.0 Preview 0.5).

As a temporary workaround, you can install the version 1.x of CSHTML5, which installs the appropriate XAML Editor into your Visual Studio (only on VS 2012, 2013, 2015, or 2017 - please note that VS 2019 is not yet supported with v1.x). It will fix the issue while waiting for the XAML Editor to be directly integrated into v2.0.

Thanks.

User avatar
TooTallTommyT
Posts: 19
Joined: Tue Aug 21, 2018 6:51 am
Location: Las Vegas, NV

Re: WPF Designer

Postby TooTallTommyT » Wed May 22, 2019 11:09 am

Actually, I had this problem with versions 1.xx in VS2015 and VS2017 as well. This is one of the reasons why I never tried to do anything serious with this framework. I have a project I'm eager to try, and with the features that are coming out with ver 2.xxx, the framework should give me enough to do what I want, but I waited to see if this issue would be fixed...which it hasn't. I can do work arounds, but it's frustrating and quite interrupts the flow.
It ain't easy being green!

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: WPF Designer

Postby JS-Support @Userware » Thu May 23, 2019 3:23 am

Thanks. We'll keep you updated asap.

User avatar
rthomas
Posts: 10
Joined: Mon Feb 18, 2019 7:03 am
Location: Lille, France

Re: WPF Designer

Postby rthomas » Fri May 24, 2019 8:59 am

Hi,

As a workaround you can create a real XAML project and reference (Add exsting -> as Link) the CSHTML5 files in it.

Remi

User avatar
TooTallTommyT
Posts: 19
Joined: Tue Aug 21, 2018 6:51 am
Location: Las Vegas, NV

Re: WPF Designer

Postby TooTallTommyT » Tue Jun 04, 2019 4:45 am

Have you actually done this, rthomas? I don't see how this works. I know how to add files by link, but I do not see how to "reference" those links once I have added them. Even if I could, how do then test it in the browser, since this isn't an actual CSHTML5 app? Do you have a sample project I could look at?

What say you JS-Support, is this a viable solution? Can you chime in and give me some insight?
It ain't easy being green!

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: WPF Designer

Postby JS-Support @Userware » Fri Jul 12, 2019 2:56 am

Hi,

It is definitely possible to share .xaml files between CSHTML5 projects (of type "Migration Edition") and WPF projects, but it is not convenient because the namespaces need to be the same.

Support for the XAML preview in v2.x should be available before the end of August.

Thank you very much.

User avatar
rthomas
Posts: 10
Joined: Mon Feb 18, 2019 7:03 am
Location: Lille, France

Re: WPF Designer

Postby rthomas » Mon Mar 02, 2020 12:38 am

Hi,

The trick is to use conditionnal using

#if CSHTML5
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;
using System.Windows.Browser;
#else
using System.Windows.Threading;
using System.Windows.Controls;
using System.Windows;
#endif

and it works great.

Remi

stevyrino
Posts: 1
Joined: Mon Apr 06, 2020 8:36 pm

Re: WPF Designer

Postby stevyrino » Tue Apr 07, 2020 3:34 pm

I am getting the invalid markup issue when trying to use the Designer using the demo Calculator app solution.
The solution will run on Start. VS seems to ignore the errors.

I am using CSHTML5_v2_0_Preview_0_6_Alpha49_068 with VS2017. Does the same thing with VS2019.

I had some hope for this tool, but now not so sure.

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: WPF Designer

Postby JS-Support @Userware » Wed Apr 08, 2020 5:09 am

Thanks. We have some issues with the XAML designer. As a workaround, to edit XAML files, please right-click on them in Solution Explorer, then click "Open With..." and choose the XML (not XAML) editor.

MD Rana
Posts: 2
Joined: Sun Mar 03, 2019 6:32 am

Re: WPF Designer

Postby MD Rana » Sat Apr 11, 2020 6:12 am

at the 1st time building your app you provide a sample site demo please upload that again that will help us


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 23 guests

 

 

cron