Click here to Skip to main content
15,899,937 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the code in xaml
<Grid>
                <TextBlock Text="{Binding Title}" Foreground="White" Margin="15 0 0 0" />
                <Path Width="12" 
                      Height="12" 
                      Fill="White" 
                      HorizontalAlignment="Left">
                    <Path.Data>
                        <Binding Path="ActualMarkerGeometry"
                             RelativeSource="{RelativeSource AncestorType=telerik:LegendItemControl}">
                        </Binding>
                    </Path.Data>
                </Path>
            </Grid>


It draws a square like this.

My questions are I thought it is supposed to use the code RectangleGeometry like this
<Path.Data>
    <RectangleGeometry Rect="50,50,25,25" />
  </Path.Data> 

But it is not. Why?

Secondary question:
The squares are on the left of the text, if I want to place them on the right, how to change the code?

What I have tried:

microsift docs uses
rectanglegeometry
.
Posted
Updated 5-Nov-17 13:50pm

1 solution

According to: Path Markup Syntax | Microsoft Docs[^]:
Quote:
powerful and complex mini-language you can use to specify path geometries

Paths are lightweight(small), scalable, retaining high quality when compared with images.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900