Jump to content

Custom Shapes XAML

Go to solution Solved by Rick Brewster,

Recommended Posts

Is there way to edit the xaml files for custom shapes to specify Fill=Solid and color=White? Ive read these properties exist on MS site. The following code does not seem to work in PDN as far as overriding the default Primary color, brush width, fill style.


Does PDN not support it or is my structure incorrect?


<Path Stroke="White" StrokeThickness="2" Fill="#FFFFFF">
    <GeometryGroup FillRule="Nonzero">
			<PathFigure IsClosed="False" IsFilled="True" StartPoint="394.52,8.41">
				<BezierSegment Point1="352.03,13.68" Point2="299,24.85" Point3="246.28,39.73" />
				<LineSegment Point="187.97,55.86" />
				<LineSegment Point="161.92,112.3" />
				<BezierSegment Point1="131.53,177.74" Point2="111.68,232.01" Point3="116.34,236.35" />
				<BezierSegment Point1="117.89,238.22" Point2="147.66,228.6" Point3="182.08,215.27" />
				<BezierSegment Point1="216.82,201.93" Point2="268.3,183.63" Point3="296.83,174.64" />
				<LineSegment Point="348.62,158.51" />
				<LineSegment Point="384.28,86.56" />
				<BezierSegment Point1="420.88,13.37" Point2="421.81,5" Point3="394.52,8.41" />
			<PathFigure IsClosed="False" IsFilled="True" StartPoint="273.57,226.74">
				<BezierSegment Point1="148.59,271.09" Point2="112.3,287.53" Point3="104.86,302.41" />
				<BezierSegment Point1="96.8,319.16" Point2="78.19,437.01" Point3="78.19,472.05" />
				<LineSegment Point="78.19,495" />
				<LineSegment Point="169.68,490.66" />
				<BezierSegment Point1="277.91,485.39" Point2="263.65,493.45" Point3="274.19,430.8" />
				<BezierSegment Point1="285.97,361.65" Point2="305.82,287.84" Point3="323.81,246.9" />
				<BezierSegment Point1="331.87,228.6" Point2="338.7,212.47" Point3="338.7,211.23" />
				<BezierSegment Point1="338.7,205.65" Point2="320.4,210.3" Point3="273.57,226.74" />


Edited by Disk4mat
Link to comment
Share on other sites

  • Solution

No. You cannot specify the color or stroke details in a custom shape. What you are trying to do is to instantiate a System.Windows.Shapes.Path object. This simply does not exist in the context of Paint.NET custom shapes. You cannot use a different root object type in your XAML, it must be SimpleGeometryShape, which does not allow you to set stroke or fill information -- those are solely for the user to configure in the toolbar.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...