i am facing one problem in SCSF.
I have two workspaces
i have two views in a module
in Viewer i have a button in toolbar whose purpose is to display PropertyViewer (another View).
how can i display this PropertyViewer in deckworkspace agaist button click event.
NOTE: i am not using Command[CommandName].AddInvoker(control, "click:) and CommandHandler
I'm going to assume your toolbar sits in a SmartPart that implements the MVP pattern. Have the button click event handler in the SmartPart fire an event that its presenter will handle. Your presenter code would look like this:
// Presenter code protected override void OnViewSet() { this.View.ToolbarButtonClick += View_ToolbarButtonClick; } public void View_ToolbarButtonClick(object sender, EventArgs e) { // remove the handler so the property viewer // will only be added the first time this.View.OnToolbarButtonClick -= View_ToolbarButtonClick; var propertyView = new PropertyViewer(); this.WorkItem.Workspaces[WorkspaceNames.MyDeckWorkspace].Show(propertyView); }