protected bool SetFromString(string xaml) { try { object o = DDTools.ReadFromXaml(xaml); if (o is Canvas) { //xamlDrawingCanvasBackground.Background = (o as Canvas).Background.Clone(); (o as Canvas).ClearValue(Panel.BackgroundProperty); xamlDrawingCanvas.SetFromCanvas(o as Canvas); return(true); } } catch (Exception) { return(false); } return(false); }