Senkwe Chanda

Hi guys,

Here's my dilemma.
I have a canvas hosting a bunch of PathGeometry's that can be dragged around and re-positioned etc. Keeping in mind that these are all very non rectangular shapes, I'd like to be able to label the Filled areas of the shapes with text. So the end result would be that both the shapes AND their corresponding text would move in unison when I darg the shapes about.

Any ideas on what the easiest way to achieve my goals is

Thanks!

Senkwe

 



Re: Windows Presentation Foundation (WPF) Need some pseudo code for a "simple" scenario

lee d

Did you try using VisualBrush

<Path Canvas.Left="100" Canvas.Top="100" Stroke="Black" StrokeThickness="1" >
<Path.Data>
<GeometryGroup >
<EllipseGeometry RadiusX="120" RadiusY="120" Center="75,75" />
</GeometryGroup>
</Path.Data>
<Path.Fill>
<VisualBrush Stretch="None">
<VisualBrush.Visual>
<TextBlock>ellipse</TextBlock>
</VisualBrush.Visual>
</VisualBrush>
</Path.Fill>
</Path>






Re: Windows Presentation Foundation (WPF) Need some pseudo code for a "simple" scenario

Senkwe Chanda

Thanks for the quick response Lee, I'll give that a shot and get back to you with my findings.

Regards

Senkwe