Live Chat Icon For mobile
Live Chat Icon

How do I access extended properties from a XAML tempalte?

Platform: WPF| Category: Styles and Templates

Here is how you would access a Canvas.Left extended property for example:

        <DataTemplate x:Key='MyTemplate1'>
            <Path Data='{Binding Geometry}'>
		<!-- The Item property returns a visual hosted inside the Canvas -->
                    <RotateTransform Angle='60' CenterX='{Binding Item.(Canvas.Left)}' 
                                     CenterY='{Binding Item.(Canvas.Top)}' 

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.