private static void AddElementToCanvas(BaseComponentUI componentUi)
 {
     if (_canvas != null)
     {
         _canvas?.Children.Add(componentUi);
     }
     else
     {
         throw new Exception("Холст не инициализирован");
     }
 }
 public void AddElementToCanvas(Canvas canvas, BaseComponentUI componentUi)
 {
     canvas.Children.Add(componentUi);
 }