Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/packages.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<MicrosoftWebXdtPackageVersion Condition="'$(MicrosoftWebXdtPackageVersion)' == ''">3.0.0</MicrosoftWebXdtPackageVersion>
<SystemComponentModelCompositionPackageVersion Condition="'$(SystemComponentModelCompositionPackageVersion)' == ''">4.5.0</SystemComponentModelCompositionPackageVersion>
<SystemPackagesVersion>4.3.0</SystemPackagesVersion>
<VSFrameworkVersion>17.1.0-preview-2-31918-073</VSFrameworkVersion>
<VSFrameworkVersion>17.2.0-preview-2-32304-091</VSFrameworkVersion>
<VSServicesVersion>16.153.0</VSServicesVersion>
<CryptographyPackagesVersion>5.0.0</CryptographyPackagesVersion>
<NuGetCoreV2Version>2.14.0-rtm-832</NuGetCoreV2Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Resources\Images.cs" />
<Compile Include="Resources\Styles.cs" />
<Compile Include="UserInterfaceService\INuGetUI.cs" />
<Compile Include="Models\PackageLicenseInfo.cs" />
<Compile Include="Models\DetailedPackageMetadata.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using NuGet.VisualStudio.Internal.Contracts;
using GelUtilities = Microsoft.Internal.VisualStudio.PlatformUI.Utilities;
using NuGet.Configuration;
using Microsoft.VisualStudio.Shell;

namespace NuGet.Options
{
Expand All @@ -24,6 +25,8 @@ internal class PackageSourceCheckedListBox : CheckedListBox

private Icon GetWarningIcon()
{
ThreadHelper.ThrowIfNotOnUIThread();

if (WarningIcon == null)
{
ImageAttributes attributes = new ImageAttributes
Expand Down Expand Up @@ -66,6 +69,8 @@ public override int ItemHeight

protected override void OnDrawItem(DrawItemEventArgs e)
{
ThreadHelper.ThrowIfNotOnUIThread();

var currentListBox = this;
var graphics = e.Graphics;
e.DrawBackground();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ private static IVsImageService2 ImageService
{
get
{
ThreadHelper.ThrowIfNotOnUIThread();
return (IVsImageService2)Package.GetGlobalService(typeof(SVsImageService));
}
}
Expand All @@ -62,6 +63,8 @@ public static Image WarningIcon
{
get
{
ThreadHelper.ThrowIfNotOnUIThread();

ImageAttributes attributes = new ImageAttributes
{
StructSize = Marshal.SizeOf(typeof(ImageAttributes)),
Expand All @@ -80,6 +83,8 @@ public static Image WarningIcon

public PackageSourcesOptionsControl(IAsyncServiceProvider asyncServiceProvider)
{
ThreadHelper.ThrowIfNotOnUIThread();

InitializeComponent();

_asyncServiceProvider = asyncServiceProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,17 @@
<Setter Property="FocusVisualStyle" Value="{StaticResource GridSplitterFocusVisualStyle}"/>
</Style>

<Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Static nuget:Styles.ThemedComboStyleKey}}">
<Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.ComboBoxStyleKey}}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
</Style>

<Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
<Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.ComboBoxItemStyleKey}}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
</Style>

<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource {x:Static nuget:Styles.ScrollBarStyleKey}}"/>
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.ScrollBarStyleKey}}"/>

<Style x:Key="{x:Type ScrollViewer}" TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource {x:Static nuget:Styles.ScrollViewerStyleKey}}"/>
<Style x:Key="{x:Type ScrollViewer}" TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource {x:Static vs:VsResourceKeys.ScrollViewerStyleKey}}"/>

<Style x:Key="TooltipStyle" TargetType="{x:Type TextBlock}">
<Setter Property="TextWrapping" Value="Wrap" />
Expand Down Expand Up @@ -556,52 +556,6 @@
</Setter>
</Style>

<Style TargetType="{x:Type ComboBoxItem}" x:Key="ComboBoxItemStyle">
<Setter Property="Foreground" Value="{DynamicResource {x:Static nuget:Brushes.UIText}}"/>
<Setter Property="FocusVisualStyle" Value="{StaticResource ControlsFocusVisualStyle}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
<Border x:Name="Bd"
SnapsToDevicePixels="true"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static nuget:Brushes.ContentMouseOverBrushKey}}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource {x:Static nuget:Brushes.ContentMouseOverTextBrushKey}}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Selector.IsSelectionActive" Value="False" />
<Condition Property="IsSelected" Value="True" />
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static nuget:Brushes.ContentInactiveSelectedBrushKey}}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource {x:Static nuget:Brushes.ContentInactiveSelectedTextBrushKey}}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="Selector.IsSelectionActive" Value="True" />
<Condition Property="IsSelected" Value="True" />
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static nuget:Brushes.ContentSelectedBrushKey}}" />
<Setter Property="TextBlock.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static nuget:Brushes.ContentSelectedTextBrushKey}}" />
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<!-- In order to create a TextBlock like element, but with selectable text use:
<TextBox Style="{DynamicResource SelectableTextBlockStyle}" />

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
</ToolTip>
</ComboBox.ToolTip>
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource ComboBoxItemStyle}">
<Style TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
<Setter Property="AutomationProperties.Name" Value="{Binding SourceName}"/>
</Style>
</ComboBox.ItemContainerStyle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
SelectionChanged="Versions_SelectionChanged"
SelectedItem="{Binding Path=SelectedVersion, Mode=TwoWay}">
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource ComboBoxItemStyle}">
<Style TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static local:Brushes.UIText}}" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsValidVersion}" Value="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@
SelectedItem="{Binding Path=SelectedVersion}">

<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource ComboBoxItemStyle}">
<Style TargetType="{x:Type ComboBoxItem}" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
<Style.Triggers>
<DataTrigger
Binding="{Binding Converter={StaticResource NotNullToBooleanConverter}}"
Expand Down
1 change: 1 addition & 0 deletions src/NuGet.Clients/NuGet.VisualStudio.Client/.vsixignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Microsoft.VisualStudio.Services.TestResults.WebApi.dll
Microsoft.VisualStudio.Services.WebApi.dll
Microsoft.VisualStudio.Services.WebApi.resources.dll
Microsoft.VisualStudio.TextTemplating.dll
Microsoft.VisualStudio.TextTemplating.resources.dll
Microsoft.VisualStudio.TextTemplating.Interfaces.dll
Microsoft.VisualStudio.TextTemplating.VSHost.dll
Microsoft.VisualStudio.Workspace.dll
Expand Down