pallavi more

pallavi more

  • NA
  • 167
  • 5.1k

how to add snap grid on canvas in c#

Sep 22 2018 8:10 AM
Border CreateDesignerCanvas(string rungName)
{
Border border = new Border();
border.BorderBrush = Brushes.Black;
border.BorderThickness = new Thickness(.5);
DesignerCanvas designerCanvas = new DesignerCanvas()
{
Focusable = true,
ContextMenu = (ContextMenu)FindResource("DesignerCanvasContextMenu"),
Background = Brushes.Transparent,
Name = rungName,
//Margin = new Thickness(3)
};
border.Child = designerCanvas;
selectedCanvas = designerCanvas;
return border;
}
 
 
i create two canvas on oone window .now i want to add snap grid without usinmg xaml  

Answers (1)