0
<DockPanel LastChildFill="True" Height="18">
<Image Height="18" Width="80">
<Image.Source>
<DrawingImage>
<DrawingImage.Drawing>
<GeometryDrawing Brush="Black">
<GeometryDrawing.Geometry>
<LineGeometry StartPoint="0,9" EndPoint="38,9" />
</GeometryDrawing.Geometry>
<GeometryDrawing.Pen>
<Pen DashCap="Flat"
Brush="Black"
Thickness="0.5"
DashStyle="{x:Static DashStyles.Dot}, Mode=OneTime}"
/>
</GeometryDrawing.Pen>
</GeometryDrawing>
</DrawingImage.Drawing>
</DrawingImage>
</Image.Source>
</Image>
<TextBlock Height="18" Text="{Binding Name, Mode=OneTime}" Margin="3,2,5,0" />
</DockPanel>
太棒了,你是我的英雄。 我試圖修復它有近2個小時。 – 2009-10-15 15:22:23
我還有其他問題:如何直接設置不同的Dashstyles,如Dot,Dash,DashDot ...? – 2009-10-15 15:24:51
我不確定我是否理解這個新問題。你的意思是你如何控制破折號模式?你應該開始另一個問題,並提供一些你想做什麼的更多細節,我會看看我能否提供幫助。 – 2009-10-15 16:05:34