custom UserControl : unable to preview this element

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.
Sesztak
Posts: 172
Joined: Fri Jun 24, 2016 2:19 am

custom UserControl : unable to preview this element

Postby Sesztak » Mon Oct 17, 2016 4:04 am

Dear JS-Support,
When we make a custom UserControl there is no XAML preview :
"unable to preview this element" with red background.

XAML and C#: nothing special just some TextBlock element.

Is it normal behaviour or a bug?

Br,
Péter

njs123
Posts: 25
Joined: Sun Dec 25, 2016 11:10 pm

Re: custom UserControl : unable to preview this element

Postby njs123 » Wed Dec 28, 2016 3:18 am

I am facing the same issue

I am creating a control inheriting from Panel
and it is not previewing in Preview Pane

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

Re: custom UserControl : unable to preview this element

Postby JS-Support @Userware » Mon Jan 09, 2017 8:14 am

Sesztak wrote:When we make a custom UserControl there is no XAML preview :
"unable to preview this element" with red background.
XAML and C#: nothing special just some TextBlock element.
Is it normal behaviour or a bug?


Hi Péter,

  • When you are editing the UserControl (meaning that you are seeing the XAML of the content of the UserControl), you should be able to see the preview. If not, can you please post your XAML code so that we can reproduce the bug?
  • When you are using the UserControl in another place, it is normal that the control appears as a red rectangle that cannot be previewed.

The general rule is this: with the current version of the XAML Preview, you cannot preview XAML elements that have a namespace (such as <mynamespace:MyControl />). However, elements without a namespace are supposed to be previewed properly.

Thanks.
Regards,
JS-Support


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 29 guests

 

 

cron