public void AddPureScriptView(IPureScriptView scriptView) { if (object.Equals(_scriptView, scriptView)) { return; } if (null != _scriptView) { this._grid.Children.Remove((UIElement)_scriptView); } _scriptView = scriptView; if (null != _scriptView) { ((UIElement)_scriptView).SetValue(Grid.RowProperty, 0); _grid.Children.Add((UIElement)_scriptView); ((UIElement)_scriptView).Focus(); } }