forked from dotnet/dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeprecationControl.xaml
More file actions
87 lines (87 loc) · 4.37 KB
/
DeprecationControl.xaml
File metadata and controls
87 lines (87 loc) · 4.37 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<UserControl x:Class="NuGet.PackageManagement.UI.DeprecationControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:nuget="clr-namespace:NuGet.PackageManagement.UI"
xmlns:nugettel="clr-namespace:NuGet.PackageManagement.Telemetry;assembly=NuGet.PackageManagement.VisualStudio"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
xmlns:shell_controls="clr-namespace:Microsoft.VisualStudio.Shell.Controls;assembly=Microsoft.VisualStudio.Shell.Styles"
mc:Ignorable="d"
d:DesignHeight="150" d:DesignWidth="350">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<nuget:SharedResources />
</ResourceDictionary.MergedDictionaries>
<nuget:ParametersToHyperlinkTupleConverter x:Key="ParametersToHyperlinkTupleConverter" />
</ResourceDictionary>
</UserControl.Resources>
<Grid
Margin="0,0,0,16">
<StackPanel
Orientation="Vertical">
<StackPanel
Orientation="Horizontal"
VerticalAlignment="Center">
<imaging:CrispImage
x:Name="_deprecationWarning"
Margin="0,0,5,0"
AutomationProperties.LabeledBy="{Binding ElementName=_deprecationLabel}"
ToolTip="{x:Static nuget:Resources.Label_Deprecated}"
Moniker="{x:Static catalog:KnownMonikers.StatusWarning}" />
<TextBlock
Name="_deprecationLabel"
FontWeight="Bold"
Text="{x:Static nuget:Resources.Label_Deprecated}"/>
</StackPanel>
<shell_controls:TextBox
Style="{DynamicResource SelectableTextBlockStyle}"
Margin="0,8,0,0"
TextWrapping="WrapWithOverflow"
Text="{Binding Path=PackageDeprecationReasons}"
AutomationProperties.Name="{x:Static nuget:Resources.Label_DeprecationReasons}"/>
<TextBlock>
<Hyperlink
NavigateUri="{Binding Path=PackageMetadata.PackageDetailsUrl}"
ToolTip="{Binding Path=PackageMetadata.PackageDetailsUrl}"
Command="{x:Static nuget:PackageManagerControlCommands.OpenExternalLink}"
CommandParameter="{x:Static nugettel:HyperlinkType.DeprecationMoreInfo}"
Style="{StaticResource HyperlinkStyleNoUri}">
<Run Text="{x:Static nuget:Resources.Deprecation_MoreInfo}" />
</Hyperlink>
</TextBlock>
<StackPanel
Margin="0,8,0,0"
Orientation="Vertical"
Visibility="{Binding Path=PackageDeprecationAlternatePackageText, Converter={StaticResource NullToVisibilityConverter}}">
<TextBlock
Text="{x:Static nuget:Resources.Label_DeprecationAlternatePackage}"
FontWeight="Bold"
x:Name="_alternatePackageLabel" />
<StackPanel
Orientation="Horizontal"
VerticalAlignment="Center">
<TextBlock
TextWrapping="Wrap"
VerticalAlignment="Center">
<Hyperlink
ToolTip="{x:Static nuget:Resources.Deprecation_LinkTooltip}"
Command="{x:Static nuget:Commands.SearchPackageCommand}"
Style="{StaticResource HyperlinkStyleNoUri}"
AutomationProperties.LabeledBy="{Binding ElementName=_alternatePackageLabel}">
<Hyperlink.CommandParameter>
<MultiBinding Converter="{StaticResource ParametersToHyperlinkTupleConverter}" Mode="OneWay" >
<Binding Path="PackageMetadata.DeprecationMetadata.AlternatePackage.PackageId" Mode="OneWay" />
<Binding Source="{x:Static nugettel:HyperlinkType.DeprecationAlternativeDetails}" />
</MultiBinding>
</Hyperlink.CommandParameter>
<Run Text="{Binding Path=PackageDeprecationAlternatePackageText}" />
</Hyperlink>
</TextBlock>
</StackPanel>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>