Note that there are some explanatory texts on larger screens.

plurals
  1. POGraphpaper Background with XAML and Path Markup Language
    text
    copied!<p>for some hours im trying to create a graphpaper background for a ListView. For a better understanding I'll describe what I mean. I want to realise it with XAML. Until now I finished the little rectangles with 10px margin, but I need another grid, with bigger lines which have a margin of 100px and I don't really understand the Path Markup Language.</p> <p>Here is my code:</p> <pre><code> &lt;DrawingBrush x:Key="ListBackgroundBrush" Viewport="0,0,10,10" ViewportUnits="Absolute" TileMode="Tile"&gt; &lt;DrawingBrush.Drawing&gt; &lt;DrawingGroup&gt; &lt;!-- Linien alle 10 Pixel --&gt; &lt;GeometryDrawing Geometry="M0,0 L1,0 1,0.1, 0,0.1Z" Brush="#EAEAEA" /&gt;&lt;!-- Wagerecht--&gt; &lt;GeometryDrawing Geometry="M0,0 L0,1 0.1,1, 0.1,0Z" Brush="#EFEFEF" /&gt;&lt;!-- Senkrecht --&gt; &lt;!-- Linien alle 100 Pixel Senkrecht --&gt; &lt;GeometryDrawing Geometry="M0,0 L1,0 1,0.2, 0,0.2Z" Brush="Red" /&gt; &lt;!-- Linien alle 100 Pixel Wagerecht --&gt; &lt;GeometryDrawing Geometry="M0,0 L1,0 1,0.2, 0,0.2Z" Brush="Green" /&gt; &lt;/DrawingGroup&gt; &lt;/DrawingBrush.Drawing&gt; &lt;/DrawingBrush&gt; &lt;ControlTemplate TargetType="ListView"&gt; &lt;Border CornerRadius="2" Background="{StaticResource ListBackgroundBrush}" BorderThickness="1,1,1,1" BorderBrush="#E1E1E1" SnapsToDevicePixels="True"&gt; &lt;/ControlTemplate&gt; </code></pre> <p>Thats what I did until now, but I dont know how to modify the Geometry Parameters to make the margin between the lines bigger.</p> <p>I'll be happy about every answer!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload