-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathReviewToolWindow.cs
42 lines (35 loc) · 1.26 KB
/
ReviewToolWindow.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Runtime.InteropServices;
using System.Windows;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using ScrumPowerTools.Framework.Presentation;
using ScrumPowerTools.Packaging;
using ScrumPowerTools.ViewModels;
namespace ScrumPowerTools
{
[Guid("1B3C001B-C023-42E0-AF06-24E0D6871EC8")]
public sealed class ReviewToolWindow : ToolWindowPane
{
private readonly ReviewViewModel viewModel;
public ReviewToolWindow() :
base(null)
{
Caption = "Review";
ToolBar = new CommandID(Identifiers.CommandGroupId, MenuCommands.TWToolbar);
ToolBarLocation = (int)VSTWT_LOCATION.VSTWT_TOP;
var view = ViewResolver.Resolve<ReviewViewModel>();
viewModel = ((FrameworkElement)view).DataContext as ReviewViewModel;
viewModel.PropertyChanged += ViewModelPropertyChanged;
Content = view;
}
void ViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "Title")
{
Caption = viewModel.Title;
}
}
}
}