2011-02-28 64 views
3

目前我正在一个样式的ScrollViewer WPF和我奇怪的符号发现这个为WPF内容

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

阅读MSDN examples。现在我真的很想知道这意味着什么,但我无法通过询问google找到答案。

那么谁能告诉我这是什么意思?

THX

+0

目前A nswers都是可怕的海事组织。 [这一个更好](http://stackoverflow.com/questions/8476766/drawing-arrows-with-path-data-wpf) – aqua 2013-05-09 02:46:28

回答

1

这样的语法被用来定义路径(一个图)。通常在Data属性Path对象中指定一个这样的字符串。语法描述为here

为什么当(在ScrollViewer风格)上RepeatButtonContent属性指定它的工作原理的原因是隐藏在那RepeatButton风格 - ScrollBarLineButtonStyle

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

在这种风格,你会发现一个PathData属性绑定到一个RepeatButtonContent属性:

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