Dynamo.Controls.DynamoView.WorkspaceTabs_SelectionChanged C# (CSharp) Method

WorkspaceTabs_SelectionChanged() private method

private WorkspaceTabs_SelectionChanged ( object sender, System.Windows.Controls.SelectionChangedEventArgs e ) : void
sender object
e System.Windows.Controls.SelectionChangedEventArgs
return void
        private void WorkspaceTabs_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (dynamoViewModel != null)
            {
                int workspace_index = dynamoViewModel.CurrentWorkspaceIndex;

                //this condition is added for shutdown when we are clearing
                //the workspace collection
                if (workspace_index == -1) return;

                var workspace_vm = dynamoViewModel.Workspaces[workspace_index];
                workspace_vm.Model.OnCurrentOffsetChanged(this, new PointEventArgs(new Point2D(workspace_vm.Model.X, workspace_vm.Model.Y)));
                workspace_vm.Model.OnZoomChanged(this, new ZoomEventArgs(workspace_vm.Zoom));

                ToggleWorkspaceTabVisibility(WorkspaceTabs.SelectedIndex);
            }
        }
DynamoView