New LineGeometry(tileRect.BottomLeft, tileRect.TopRight)
New LineGeometry(tileRect.TopLeft, tileRect.BottomRight), ViewportUnits = BrushMappingMode.Absolute, If you want to generate the brush dynamically, here's an equivalent function based on the above XAML: static Brush CreateGridBrush(Rect bounds, Size tileSize) Then finally to use it, just set it as the background of your grid (or other panel): So to have a starting position of (30, 45) (corresponding to startX and startY) with the width and height, 130x120: Now to be able to draw them offset in your grid from the edges, you need to have another brush where you draw a rectangle with the desired dimensions, filled with your tiles. (p.s., the slope slop is redundant since you already have the horizontal and vertical step sizes) So to have a 20x10 tile (which corresponds to stepX and stepY): To draw your tile, you could think of it as drawing X's. You're just drawing a grid so you could just create a DrawingBrush to draw a single grid square and tile it to fill in the rest. If you want to draw lines, use the appropriate geometries to draw them. You don't really have to 'draw' anything with WPF.