Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Created July 20, 2020 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuongmep/18221d5aeffc2afae152cf6b6487285c to your computer and use it in GitHub Desktop.
Save chuongmep/18221d5aeffc2afae152cf6b6487285c to your computer and use it in GitHub Desktop.
class DockableViewModel : ViewModelBase
{
public DockableViewModel(UIControlledApplication a)
{
a.ViewActivated += OnViewActivated;
}
private void OnViewActivated(object sender, ViewActivatedEventArgs e)
{
this.Document = e.Document;
}
private Document document;
public Document Document
{
get => document;
set
{
document = value;
OnPropertyChanged("Document");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment