Skip to main content

Microsoft Silverlight

Answered Question Formatting Path Data LinesRSS Feed

(0)

WadeFlextronics
WadeFlex...

Member

Member

377 points

82 Posts

Formatting Path Data Lines

Does anyone know of a tool or way in VS2008 or Blend 2 to reformat very long path data lines so they are spread over multiple lines instead of one big long line?

(Please mark as Answered if this helps!) Cool

Thanks,
Wade

david.yanez.v
david.ya...

Member

Member

397 points

69 Posts

Re: Formatting Path Data Lines

Hi 

For this kind of issue you may want to concatenate strings, but if you want more efficient code you can use StringBuilder.

	// C# Code from MSDN
// Initialize the StringBuilder with "ABC".
StringBuilder sb = new StringBuilder("ABC", 50);

// Append three characters (D, E, and F) to the end of the StringBuilder.
sb.Append(new char[] { 'D', 'E', 'F' });

// Append a format string to the end of the StringBuilder.
sb.AppendFormat("GHI{0}{1}", 'J', 'k');

// Display the number of characters in the StringBuilder and its string.
Console.WriteLine("{0} chars: {1}", sb.Length, sb.ToString());

 

 Regards

please click answer if this solved your problem.

David !!!

WadeFlextronics
WadeFlex...

Member

Member

377 points

82 Posts

Re: Re: Formatting Path Data Lines

I don't think you understand what I am looking for.  In XAML when you have a <Path> declared and you have the <Data> line is a long listing of numerical values.  If there are several points in the path it creates a very long list of numbers.  In VS when I open a usercontrol with one of these with long lines then I get a message saying it will slow down the IDE if you continue opening. 

So, what I would like to do is to have a utility to split the long number strings with line breaks and to make sure it breaks on a comma and not in the middle of a decimal number.

(Please mark as Answered if this helps!) Cool

Thanks,
Wade

Yi-Lun Luo - MSFT
Yi-Lun L...

All-Star

All-Star

25052 points

2,747 Posts

Answered Question

Re: Formatting Path Data Lines

Unfortunately currently there's no tool for this... But of course you can write a custom utility. It shouldn't be very difficult.

shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities