Skip to main content
Home Forums Silverlight Programming Visual Studio & Silverlight Development Tools Formatting Path Data Lines
3 replies. Latest Post by Yi-Lun Luo - MSFT on October 24, 2008.
(0)
WadeFlex...
Member
377 points
82 Posts
10-22-2008 11:14 AM |
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?
david.ya...
397 points
69 Posts
10-23-2008 1:32 AM |
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
10-23-2008 10:42 AM |
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.
Yi-Lun L...
All-Star
25052 points
2,747 Posts
10-24-2008 5:58 AM |
Unfortunately currently there's no tool for this... But of course you can write a custom utility. It shouldn't be very difficult.