<UserControl x:Class="NuGet.PackageManagement.UI.DeprecationControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:nuget="clr-namespace:NuGet.PackageManagement.UI"
             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"  
             mc:Ignorable="d"
             d:DesignHeight="150" d:DesignWidth="350">
  <UserControl.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <nuget:SharedResources />
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </UserControl.Resources>
  <Grid
    Margin="0,12,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>
        <TextBox
          Style="{DynamicResource SelectableTextBlockStyle}" 
          Margin="0,8,0,0"
          TextWrapping="WrapWithOverflow"
          Text="{Binding Path=PackageDeprecationReasons}"
          AutomationProperties.Name="{x:Static nuget:Resources.Label_DeprecationReasons}"/>
        <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">
            <TextBox
              Style="{DynamicResource SelectableTextBlockStyle}" 
              TextWrapping="Wrap"
              VerticalAlignment="Center"
              AutomationProperties.LabeledBy="{Binding ElementName=_alternatePackageLabel}"
              Text="{Binding Path=PackageDeprecationAlternatePackageText}"/>
          </StackPanel>
        </StackPanel>
      </StackPanel>
  </Grid>
</UserControl>
