private void SelectItem(ISelectable item) { if (SelectedItemHost == item) { return; } if (SelectedItemHost != null) { SelectedItemHost.IsSelected = false; SelectedItemHost.ReleaseMouseCapture(); SelectedItemHost = null; } if (item != null) { SelectedItemHost = item; SelectedItemHost.IsSelected = true; SelectedItemHost.CaptureMouse(); } _surface.RemoveSelectionCommand.RaiseCanExecuteChanged(); //SelectionService.SelectedComponent = control; }
private void SelectItem(ISelectable item) { if (SelectedItemHost == item) return; if (SelectedItemHost != null) { SelectedItemHost.IsSelected = false; SelectedItemHost.ReleaseMouseCapture(); SelectedItemHost = null; } if (item != null) { SelectedItemHost = item; SelectedItemHost.IsSelected = true; SelectedItemHost.CaptureMouse(); } _surface.RemoveSelectionCommand.RaiseCanExecuteChanged(); //SelectionService.SelectedComponent = control; }