Thanks a lot , that works , final example separated both PATH variables…
var grid = new GridPattern() {CellSize = new Size(10, 10)};
var pathhor = new Path() { Stroke = new SolidColorBrush(Colors.WhiteSmoke),StrokeThickness = 1};
GridPattern.SetFigure(pathhor , GridFigure.HorizontalLine);
grid.Children.Add(pathhor);
var pathver = new Path() {Stroke = new SolidColorBrush(Colors.WhiteSmoke),StrokeThickness = 1};
GridPattern.SetFigure(pathver , GridFigure.VerticalLine);
grid.Children.Add(pathver);
myDiagram.GridPattern = grid;