av.arce

Hi,

How do I use the Path element as a resource Here is an example:

<FixedPage ... >

<FixedPage.Resources>

<ResourceDictionary>

<Path x:Key="Reference" Stroke="#FF01FF" StrokeThickness="2" ... />

</ResourceDictionary>

</FixedPage.Resources>

</FixedPage>

*Note: "..." means other codes

My problem is, where will I place the "{StaticResource Reference}" value so that I can reference the Path that I have created I hope someone could help me on this one.

Thank You,

av.arce



Re: XML Paper Specification (XPS) Using the Path element as a resource

Feng Yuan

According to the XPS specification, the only place a Path (Glyphs and Canvas) element can be reused through Resource Dictionary is from a VisualBrush.

But you can put a PathGeometry into a Resource Dictionary and reference from a path.

Eg:

<ResourceDictionary>

<PathGeometry x:Key="path1" Figures="..." />

</ResourceDictionary>

...

<Path Data="StaticResource path1" ... />

Feng Yuan






Re: XML Paper Specification (XPS) Using the Path element as a resource

av.arce

Thanks. It's indeed used only for the Visual attribute of the VisualBrush element.