private void Load() { ShellInteractionService.ShowProgress(); try { _view = WorkItem.SmartParts.AddNew(ViewType) as IDataView; EventHandler <DataEventArgs <object> > temp = ViewLoaded; if (temp != null) { temp(this, new DataEventArgs <object>(_view)); } if (_data != null) { _view.PresentData(_data); } if (_isDetailView != null) { _view.IsDetailView = _isDetailView.Value; } if (_update) { _view.Update(_parameters); } if (_focus) { _view.SetFocus(); } if (!string.IsNullOrEmpty(_title)) { _view.Title = _title; } if (_refreshDataOnShow != null) { _view.RefreshDataOnShow = _refreshDataOnShow.Value; } Content = _view; } finally { ShellInteractionService.HideProgress(); } }
public void PresentData(object data) { if (_view == null) { this._data = data; this._parameters = null; _update = false; } else { _view.PresentData(data); } }