2011-02-28 60 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}}" 
     .../>