Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7541253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:50:42+00:00 2026-05-30T07:50:42+00:00

for some hours im trying to create a graphpaper background for a ListView. For

  • 0

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.

Here is my code:

    <DrawingBrush x:Key="ListBackgroundBrush" Viewport="0,0,10,10" ViewportUnits="Absolute" TileMode="Tile">
    <DrawingBrush.Drawing>
        <DrawingGroup>
            <!--  Linien alle 10 Pixel -->
            <GeometryDrawing Geometry="M0,0 L1,0 1,0.1, 0,0.1Z" Brush="#EAEAEA" /><!-- Wagerecht-->
            <GeometryDrawing Geometry="M0,0 L0,1 0.1,1, 0.1,0Z" Brush="#EFEFEF" /><!--  Senkrecht -->

            <!-- Linien alle 100 Pixel Senkrecht  -->
            <GeometryDrawing Geometry="M0,0 L1,0 1,0.2, 0,0.2Z" Brush="Red" />
            <!-- Linien alle 100 Pixel Wagerecht -->
            <GeometryDrawing Geometry="M0,0 L1,0 1,0.2, 0,0.2Z" Brush="Green" />
        </DrawingGroup>
    </DrawingBrush.Drawing>
</DrawingBrush>    
<ControlTemplate TargetType="ListView">
                <Border CornerRadius="2" Background="{StaticResource ListBackgroundBrush}" BorderThickness="1,1,1,1" BorderBrush="#E1E1E1"  SnapsToDevicePixels="True">
</ControlTemplate>

Thats what I did until now, but I dont know how to modify the Geometry Parameters to make the margin between the lines bigger.

I’ll be happy about every answer!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:50:43+00:00Added an answer on May 30, 2026 at 7:50 am

    GeometryDrawing.Brush is the fill, or background color. GeometryDrawing.Pen is the line color. It appears you’re intending to color the lines of your Graph paper but you’re using the wrong property. When I fixed that, I noticed your 10px grid lines don’t repeat under the 100px grid lines they way you wanted, so here’s the solution I came up with.

    <DrawingBrush x:Key="ListBackgroundBrush" Viewport="0,0,100,100" ViewportUnits="Absolute" TileMode="Tile">
        <DrawingBrush.Drawing>
            <DrawingGroup>
    
                <!-- Geometry for the 10px squares -->
                <GeometryDrawing Brush="White">
                    <GeometryDrawing.Geometry>
                        <GeometryGroup>
                            <PathGeometry  Figures="
                              M10,0 L10,100 
                              M20,0 L20,100
                              M30,0 L30,100 
                              M40,0 L40,100
                              M50,0 L50,100 
                              M60,0 L60,100
                              M70,0 L70,100 
                              M80,0 L80,100
                              M90,0 L90,100
    
                              M0,10 L100,10 
                              M0,20 L100,20
                              M0,30 L100,30 
                              M0,40 L100,40
                              M0,50 L100,50 
                              M0,60 L100,60
                              M0,70 L100,70 
                              M0,80 L100,80
                              M0,90 L100,90"  />
                        </GeometryGroup>
                    </GeometryDrawing.Geometry>
                    <GeometryDrawing.Pen>
                        <Pen Thickness="1" Brush="Green" />
                    </GeometryDrawing.Pen>
                </GeometryDrawing>
    
                <!-- Geometry for the 100px squares -->
                <GeometryDrawing Brush="Transparent">
                    <GeometryDrawing.Geometry>
                        <GeometryGroup>
                            <PathGeometry  Figures="M0,0 L100,0 L100,100" />
                        </GeometryGroup>
                    </GeometryDrawing.Geometry>
                    <GeometryDrawing.Pen>            
                        <Pen Thickness="3" Brush="Green" />
                    </GeometryDrawing.Pen>
                </GeometryDrawing>
    
            </DrawingGroup>
        </DrawingBrush.Drawing>
    </DrawingBrush> 
    
    <Grid Background="{StaticResource ListBackgroundBrush}" />  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I spend quite some hours banging my head against the wall trying to set
I am trying to create dropdown menu for Wordpress theme and having some silly
I've been trying to create some php code that would let me take input
I've just wasted the past two hours of my life trying to create a
I've been trying for the last several hours to find a way to create
I have a database with some tables and columns. I want to create a
Im probably some 4 hours old working with flash CS5, and im trying to
In the docs, Apple gives an example on how to add some hours and
I have some strings of xxh:yym format where xx is hours and yy is
I've been fighting this problem for many hours now and could really use some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.