Class ReferencesViewModel
Represents a view model for a 'Find all references' tool.
public class ReferencesViewModel : Tool, IViewAware, IChild, ITool, ILayoutItem, IScreen, IHaveDisplayName, IActivate, IDeactivate, IGuardClose, IClose, INotifyPropertyChangedEx, INotifyPropertyChanged
- Inheritance
-
PropertyChangedBaseViewAwareScreenReferencesViewModel
- Implements
-
IViewAwareIChildIScreenIHaveDisplayNameIActivateIDeactivateIGuardCloseICloseINotifyPropertyChangedEx
- Derived
- Inherited Members
-
Screen.OnInitialize()Screen.OnActivate()Screen.ParentScreen.IsActiveScreen.IsInitializedScreen.ActivatedScreen.AttemptingDeactivationScreen.DeactivatedViewAware.DefaultContextViewAware.ViewsViewAware.ViewAttachedPropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.PropertyChanged
Constructors
ReferencesViewModel(IScriptShell, IEnumerable<IEditorFactory>)
Initializes a new instance of the ReferencesViewModel class.
public ReferencesViewModel(IScriptShell scriptShell, IEnumerable<IEditorFactory> editorFactories)
Parameters
scriptShell
IScriptShellScript shell where a reference is open.
editorFactories
IEnumerable<IEditorFactory>Factories to create an editor of ProjectItem.
Properties
Definitions
Gets the definition view models.
public IEnumerable<DefinitionViewModel> Definitions { get; }
Property Value
DisplayName
Gets or Sets the display name. Do not set this property.
public override string DisplayName { get; set; }
Property Value
OpenRefernceCommand
Gets a command to open a reference.
public ICommand OpenRefernceCommand { get; }
Property Value
PreferredLocation
Gets the preferred tool location.
public override PaneLocation PreferredLocation { get; }
Property Value
ReferencedItem
Gets or sets the name of the referenced item.
public string ReferencedItem { get; set; }
Property Value
ToolTitle
Gets a translated tool title. {0} is replaced by ReferencedItem.
protected virtual ITranslation ToolTitle { get; }
Property Value
- ITranslation
Methods
SetDefinitions(IEnumerable<IDefinition>)
Sets the definitions of references.
public void SetDefinitions(IEnumerable<IDefinition> definitions)
Parameters
definitions
IEnumerable<IDefinition>Definitions to show.
Exceptions
- ArgumentNullException
Thrown when
definitions
is null.