Strange notation for WPF content

I am currently developing a WPF ScrollViewer and I found this

Content="M 0 0 L 4 4 L 0 8 Z"

reading MSDN examples . Now I would really like to know what this means, but I could not find the answer by asking Google.

So can someone tell me what that means?

thank

+3
source share
3 answers

It looks like it's a markup of the path

Here you can find the syntax MSDN path markup syntax

+1
source

(). a Data Path. .

The reason it works when it is specified in a Contentstyle property RepeatButton(in style ScrollViewer) is hidden in the style of this RepeatButton- ScrollBarLineButtonStyle:

<RepeatButton Style="{StaticResource ScrollBarLineButtonStyle}"
              ...
              Content="M 0 4 L 7 4 L 3.5 0 Z"/>

In this style you will find Pathwith a property Datarelated to the property of the Contentobject RepeatButton:

<Path Data="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}"
      .../>
+1
source

Source: https://habr.com/ru/post/1795189/


All Articles