Skip to main content

Microsoft Silverlight

Unanswered Question Bug in C# Code PastingRSS Feed

(0)

mchlSync
mchlSync

Star

Star

14606 points

2,730 Posts

Silverlight MVP

Bug in C# Code Pasting

Steps to perform :

  • Write a New Post
  • Click on Souce Code Icon (which is beside HTML icon) in toolbar of this Editor.
  • Paste the code below
var str = string.Empty;

str += @"<ListBoxItem xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">";

str += @" <ListBoxItem.ContentTemplate>";

str += @" <DataTemplate>";

str += @" <StackPanel>";

str += @" <TextBlock Text=""Third"" />";

str += @" </StackPanel>";

str += @" </DataTemplate>";

str += @" </ListBoxItem.ContentTemplate>";

str += @"</ListBoxItem>";

listbox.Items.Add((ListBoxItem)XamlReader.Load(str));

  • You will see the output as below.
var str = string.Empty;
            str += @"&lt;ListBoxItem  xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"">";
            str += @"   ";
            str += @"    ";
            str += @"       ";
            str += @"         ""Third"">";
            str += @"       ";
            str += @"    ";
            str += @"   ";
            str += @"";

            listbox.Items.Add((ListBoxItem)XamlReader.Load(str));
            
 

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


amyo
amyo

Contributor

Contributor

3660 points

495 Posts

Re: Bug in C# Code Pasting

I found another one:

If i paste the code below by clicking the Source Code Icon of the editor

List<Page> myPage = new List<Page>();

You will see the output as below:

List myPage = new List();
  

Amyo Kabir
Solution Architect & Sr. Developer
Blog

meidianto
meidianto

Member

Member

605 points

130 Posts

Re: Re: Bug in C# Code Pasting

Got the same issue as Amyo when I was posting this:
http://forums.silverlight.net/forums/p/137651/309673.aspx#309673

I used XML formatting instead due to C# code formatting bug.

Please "Mark as Answer" if this post answers your question.

Ferry Meidianto
www.meidianto.com

JayNeu
JayNeu

Participant

Participant

996 points

212 Posts

Moderator

Re: Bug in C# Code Pasting

All,

We already have a ticket in our system to update the version of our rich-text editor, which also includes the "Code formatting" options.  Most of the issues reported will be addressed.  This thread will be updated once the fix has been deployed.  Thank you again for your continued patience.

Jay Esguerra
Neudesic - Project Manager

blitzd
blitzd

Member

Member

112 points

71 Posts

Re: Bug in C# Code Pasting

Any ETA on that? Because I've been hearing that it's coming for almost 2 months now, and patience seems to be in short supply.

JayNeu
JayNeu

Participant

Participant

996 points

212 Posts

Moderator

Re: Bug in C# Code Pasting

I can understand your frustration, the issue is that we are still using an older Community Server forums platform, tied in with an older rich text editor.  We do have a replacement, but are in the process of regression testing the fix.

Jay Esguerra
Neudesic - Project Manager

meidianto
meidianto

Member

Member

605 points

130 Posts

Re: Re: Bug in C# Code Pasting

This is just a suggestion. Maybe you can add a Road Map section in this website so we can know what we (community) can expect in the future releases/updates of this website.

Please "Mark as Answer" if this post answers your question.

Ferry Meidianto
www.meidianto.com

JayNeu
JayNeu

Participant

Participant

996 points

212 Posts

Moderator

Re: Re: Bug in C# Code Pasting

Definitely a good idea and already in the works!  We are putting that together as we speak.

Jay Esguerra
Neudesic - Project Manager
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities