public void StartProccess() { var labyrinthModel = FileParser.ParseLabyrinthFile(); _representation = new Representation(canvasLabyrinth); _representation.DrawLabyrinth(labyrinthModel); var labyrinthProccessor = new LabyrinthProcessor(); labyrinthProccessor.StepChanged += LabyrinthProccessor_StepChanged; new Thread(() => { var result = labyrinthProccessor.ProccessLabyrinth(labyrinthModel); rbResult.Dispatcher.BeginInvoke((Action)(() => { var strResults = string.Join(" ", result.Select(e => $"{{{e.X},{e.Y}}}")); rbResult.Text = strResults; })); }).Start(); }