Answer the question
In order to leave comments, you need to log in
WPF window hangs?
Why the program hangs, and in general the window does not move to the second screen, any change in the size of the window, and freezes, as if the image element is redrawn there a trillion times
foreach(var edge in edges) // 10 000+
{
c.DrawLine(pen, new Point(edge.Start.X,edge.Start.Y),new Point(edge.End.X,edge.End.Y));
}
c.Close();
var i = new Image();
d.Drawing.Freeze();/// ? вообще не врубаюсь что этот метод делает
// но pen.Freeze() повышает скорость программы в 100000000000000000 раз как минимум
i.Source = new DrawingImage(d.Drawing);
i.Source.Freeze();
Canvas.Children.Add(i);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question