void Triangle_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            FrameworkElement source = sender as FrameworkElement;

            switch (source.Name)
            {
            case "ClassExpandedTriangle":
            case "ClassCollapsedTriangle":
                if (_classGridCollapsed)
                {
                    ClassExpandedTriangle.Visibility  = Visibility.Visible;
                    ClassCollapsedTriangle.Visibility = Visibility.Collapsed;
                    ClassCollapsedTitle.Visibility    = Visibility.Collapsed;
                    ClassGrid.Height = Double.NaN;
                    ClassGrid.UpdateLayout();
                }
                else
                {
                    ClassCollapsedTriangle.Visibility = Visibility.Visible;
                    ClassExpandedTriangle.Visibility  = Visibility.Collapsed;
                    ClassCollapsedTitle.Visibility    = Visibility.Visible;
                    ClassGrid.Height = 50;
                }
                _classGridCollapsed = !_classGridCollapsed;
                break;

            case "LegendExpandedTriangle":
            case "LegendCollapsedTriangle":
                if (_legendGridCollapsed)
                {
                    LegendExpandedTriangle.Visibility  = Visibility.Visible;
                    LegendCollapsedTriangle.Visibility = Visibility.Collapsed;
                    LegendCollapsedTitle.Visibility    = Visibility.Collapsed;
                    LegendGrid.Height = Double.NaN;
                    LegendGrid.UpdateLayout();
                }
                else
                {
                    LegendCollapsedTriangle.Visibility = Visibility.Visible;
                    LegendExpandedTriangle.Visibility  = Visibility.Collapsed;
                    LegendCollapsedTitle.Visibility    = Visibility.Visible;
                    LegendGrid.Height = 50;
                }
                _legendGridCollapsed = !_legendGridCollapsed;
                break;
            }
        }
 internal void Init()
 {
     grid = GetComponent <ClassGrid>();
     grid.Init();
 }