File: ValueTracking\ValueTrackingRoot.xaml.cs
Web Access
Project: src\src\VisualStudio\Core\Def\Microsoft.VisualStudio.LanguageServices_pxr0p0dn_wpftmp.csproj (Microsoft.VisualStudio.LanguageServices)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
 
using System.Windows;
using System.Windows.Controls;
 
namespace Microsoft.VisualStudio.LanguageServices.ValueTracking;
 
/// <summary>
/// Interaction logic for ValueTrackingRoot.xaml
/// </summary>
internal partial class ValueTrackingRoot : UserControl
{
    public string EmptyText => ServicesVSResources.Select_an_appropriate_symbol_to_start_value_tracking;
 
    public ValueTrackingRoot()
    {
        InitializeComponent();
    }
 
    public void SetChild(FrameworkElement? child)
    {
        RootGrid.Children.Clear();
 
        if (child is null)
        {
            RootGrid.Children.Add(EmptyTextMessage);
            EmptyTextMessage.Visibility = Visibility.Visible;
        }
        else
        {
            EmptyTextMessage.Visibility = Visibility.Collapsed;
            RootGrid.Children.Add(child);
        }
    }
}