示例#1
0
        private void CreateNewViewModel()
        {
            var control  = Content as LogsViewerToolWindowControl;
            var newModel = new LogsViewerViewModel();

            control.DataContext = newModel;
            newModel.InvalidateAllProperties();
        }
        private void CreateNewViewModel()
        {
            object toolWindowIdNumber;

            ((IVsWindowFrame)Frame).GetProperty((int)VsFramePropID.MultiInstanceToolNum, out toolWindowIdNumber);
            int windowIdNumber = Convert.ToInt32(toolWindowIdNumber);
            var newModel       = new LogsViewerViewModel(windowIdNumber);

            _content.DataContext = newModel;
            newModel.InvalidateAllProperties();
        }