目前我正在一個樣式的ScrollViewer WPF和我奇怪的符號發現這個爲WPF內容
Content="M 0 0 L 4 4 L 0 8 Z"
閱讀MSDN examples。現在我真的很想知道這意味着什麼,但我無法通過詢問google找到答案。
那麼誰能告訴我這是什麼意思?
THX
目前我正在一個樣式的ScrollViewer WPF和我奇怪的符號發現這個爲WPF內容
Content="M 0 0 L 4 4 L 0 8 Z"
閱讀MSDN examples。現在我真的很想知道這意味着什麼,但我無法通過詢問google找到答案。
那麼誰能告訴我這是什麼意思?
THX
它看起來是一個路徑標記
您可以在這裏找到語法MSDN Path Markup Syntax
這樣的語法被用來定義路徑(一個圖)。通常在Data
屬性Path
對象中指定一個這樣的字符串。語法描述爲here。
爲什麼當(在ScrollViewer
風格)上RepeatButton
的Content
屬性指定它的工作原理的原因是隱藏在那RepeatButton
風格 - ScrollBarLineButtonStyle
:
<RepeatButton Style="{StaticResource ScrollBarLineButtonStyle}"
...
Content="M 0 4 L 7 4 L 3.5 0 Z"/>
在這種風格,你會發現一個Path
其Data
屬性綁定到一個RepeatButton
的Content
屬性:
<Path Data="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}"
.../>
目前A nswers都是可怕的海事組織。 [這一個更好](http://stackoverflow.com/questions/8476766/drawing-arrows-with-path-data-wpf) – aqua 2013-05-09 02:46:28