2024-09-21WPF dynamically generate grid with calculated rows and columns, put the custom control in the specifprivatevoidFillGridRandomly(){rowsColsSet=newHashSet<XY>();if(gd!=null){gd.Children.Clear();}for(inti=0;i<50;i++){while(true){XYxy=newXY();