public PackageRestoreBar(INuGetSolutionManagerService solutionManager, IPackageRestoreManager packageRestoreManager, IProjectContextInfo projectContextInfo) { DataContext = this; InitializeComponent(); _uiDispatcher = Dispatcher.CurrentDispatcher; _solutionManager = solutionManager; _packageRestoreManager = packageRestoreManager; _projectContextInfo = projectContextInfo; if (_packageRestoreManager != null) { _packageRestoreManager.PackagesMissingStatusChanged += OnPackagesMissingStatusChanged; if (_projectContextInfo?.ProjectStyle == ProjectModel.ProjectStyle.PackageReference) { _packageRestoreManager.AssetsFileMissingStatusChanged += OnAssetsFileMissingStatusChanged; } } // Set DynamicResource binding in code // The reason we can't set it in XAML is that the VsBrushes class comes from either // Microsoft.VisualStudio.Shell.10 or Microsoft.VisualStudio.Shell.11 assembly, // depending on whether NuGet runs inside VS10 or VS11. StatusMessage.SetResourceReference(TextBlock.ForegroundProperty, VsBrushes.InfoTextKey); RestoreBar.SetResourceReference(Border.BackgroundProperty, VsBrushes.InfoBackgroundKey); RestoreBar.SetResourceReference(Border.BorderBrushProperty, VsBrushes.ActiveBorderKey); // Find storyboards that will be used to smoothly show and hide the restore bar. _showRestoreBar = FindResource("ShowSmoothly") as Storyboard; _hideRestoreBar = FindResource("HideSmoothly") as Storyboard; }
public PackageRestoreBar(IPackageRestoreManager packageRestoreManager) { InitializeComponent(); _packageRestoreManager = packageRestoreManager; _packageRestoreManager.PackagesMissingStatusChanged += OnPackagesMissingStatusChanged; // Set DynamicResource binding in code // The reason we can't set it in XAML is that the VsBrushes class come from either // Microsoft.VisualStudio.Shell.10 or Microsoft.VisualStudio.Shell.11 assembly, // depending on whether NuGet runs inside VS10 or VS11. StatusMessage.SetResourceReference(TextBlock.ForegroundProperty, VsBrushes.InfoTextKey); RestoreBar.SetResourceReference(Border.BackgroundProperty, VsBrushes.InfoBackgroundKey); RestoreBar.SetResourceReference(Border.BorderBrushProperty, VsBrushes.ActiveBorderKey); }
public ProductUpdateBar(IProductUpdateService productUpdateService) { InitializeComponent(); if (productUpdateService == null) { throw new ArgumentNullException("productUpdateService"); } _productUpdateService = productUpdateService; _productUpdateService.UpdateAvailable += OnUpdateAvailable; // Set DynamicResource binding in code // The reason we can't set it in XAML is that the VsBrushes class come from either // Microsoft.VisualStudio.Shell.10 or Microsoft.VisualStudio.Shell.11 assembly, // depending on whether NuGet runs inside VS10 or VS11. UpdateBar.SetResourceReference(Border.BackgroundProperty, VsBrushes.InfoBackgroundKey); UpdateBar.SetResourceReference(Border.BorderBrushProperty, VsBrushes.ActiveBorderKey); StatusMessage.SetResourceReference(TextBlock.ForegroundProperty, VsBrushes.InfoTextKey); }
public PackageRestoreBar(ISolutionManager solutionManager, IPackageRestoreManager packageRestoreManager) { InitializeComponent(); UIDispatcher = Dispatcher.CurrentDispatcher; SolutionManager = solutionManager; PackageRestoreManager = packageRestoreManager; if (PackageRestoreManager != null) { PackageRestoreManager.PackagesMissingStatusChanged += OnPackagesMissingStatusChanged; } // Set DynamicResource binding in code // The reason we can't set it in XAML is that the VsBrushes class comes from either // Microsoft.VisualStudio.Shell.10 or Microsoft.VisualStudio.Shell.11 assembly, // depending on whether NuGet runs inside VS10 or VS11. StatusMessage.SetResourceReference(TextBlock.ForegroundProperty, VsBrushes.InfoTextKey); RestoreBar.SetResourceReference(Border.BackgroundProperty, VsBrushes.InfoBackgroundKey); RestoreBar.SetResourceReference(Border.BorderBrushProperty, VsBrushes.ActiveBorderKey); // Find storyboards that will be used to smoothly show and hide the restore bar. showRestoreBar = this.FindResource("ShowSmoothly") as Storyboard; hideRestoreBar = this.FindResource("HideSmoothly") as Storyboard; }