public FeatureNavigation(ControlInfo info)
 {
     _control = info;
     InitializeComponent();
     _homeIcon         = new C1PathIcon();
     _homeIcon.Data    = "M12.832,16h-2.666c-0.275,0-0.5-0.224-0.5-0.5v-4.333C9.666,11.075,9.592,11,9.5,11h-3c-0.092,0-0.168,0.075-0.168,0.167V15.5c0,0.276-0.223,0.5-0.5,0.5H3.166C2.523,16,2,15.477,2,14.833V8.667H0.832C0.373,8.667,0,8.292,0,7.833c0-0.221,0.09-0.437,0.246-0.594l7.406-7.101c0.195-0.186,0.5-0.186,0.693,0l7.4,7.093C15.91,7.396,16,7.612,16,7.833c0,0.459-0.375,0.834-0.834,0.834H14v6.166C14,15.477,13.477,16,12.832,16z M10.666,15h2.166C12.924,15,13,14.924,13,14.833V8.167c0-0.276,0.223-0.5,0.5-0.5h1.254L8,1.192L1.246,7.667H2.5c0.275,0,0.5,0.224,0.5,0.5v6.666C3,14.924,3.076,15,3.166,15h2.166v-3.833C5.332,10.523,5.855,10,6.5,10h3c0.643,0,1.166,0.523,1.166,1.167V15z";
     this.btnHome.Icon = _homeIcon;
     LayoutControls();
     loadSamples();
     treeFeatures.Columns[0].CustomContentPresenter = new CustomNode();
     lblSelectedControl.Icon = info.Icon;
     lblSelectedControl.Text = info.Name;
 }
        public override void SetValue(object value)
        {
            FeatureInfo feature = value as FeatureInfo;

            if (feature.IsNew)
            {
                var           size   = ScaleToDeviceDPI(new Size(16, 16));
                var           icon1  = new C1PolygonIcon();
                List <PointF> points = new List <PointF>();
                points.Add(new PointF(12.115f, 8.084f));
                points.Add(new PointF(14.158f, 6.093f));
                points.Add(new PointF(10.929f, 5.623f));
                points.Add(new PointF(11.322f, 2.681f));
                points.Add(new PointF(9.202f, 3.897f));
                points.Add(new PointF(8.121f, 1.706f));
                points.Add(new PointF(6.807f, 4.367f));
                points.Add(new PointF(3.863f, 2.956f));
                points.Add(new PointF(4.449f, 5.749f));
                points.Add(new PointF(2.083f, 6.093f));
                points.Add(new PointF(3.943f, 7.907f));
                points.Add(new PointF(1.821f, 10.135f));
                points.Add(new PointF(4.857f, 10.462f));
                points.Add(new PointF(4.389f, 13.19f));
                points.Add(new PointF(6.748f, 11.95f));
                points.Add(new PointF(8.016f, 14.296f));
                points.Add(new PointF(9.15f, 11.77f));
                points.Add(new PointF(11.852f, 13.19f));
                points.Add(new PointF(11.332f, 10.157f));
                points.Add(new PointF(13.889f, 9.688f));
                icon1.Points   = points.ToArray();
                icon1.IsClosed = true;
                icon1.Color    = Color.FromArgb(220, 154, 49);
                icon1.Size     = size;
                var icon2 = new C1PathIcon();
                icon2.Data  = "M8.121,1.706l1.081,2.191l2.12-1.217l-0.394,2.942l3.229,0.47l-2.043,1.991l1.773,1.604l-2.557,0.469l0.52,3.033L9.15,11.77l-1.135,2.526L6.748,11.95l-2.359,1.24l0.469-2.729l-3.037-0.327l2.123-2.228L2.083,6.093l2.367-0.344L3.863,2.956l2.943,1.411L8.121,1.706 M8.121,0L7.443,1.372L6.461,3.364L4.19,2.275L2.812,1.614L3.125,3.11l0.42,2.008L1.974,5.346l-1.513,0.22l1.095,1.067l1.327,1.294L1.274,9.614L0.22,10.722l1.521,0.163l2.237,0.241l-0.333,1.938L3.387,14.57l1.354-0.712l1.699-0.893l0.912,1.688L8.078,16l0.627-1.396l0.805-1.793l1.991,1.047l1.354,0.712l-0.259-1.507l-0.394-2.298l1.823-0.335l1.504-0.274L14.395,9.13l-1.178-1.066l1.469-1.43l1.095-1.068l-1.513-0.22l-2.492-0.362l0.295-2.202l0.203-1.517l-1.326,0.762L9.523,2.843L8.797,1.372L8.121,0L8.121,0z";
                icon2.Color = Color.White;
                icon2.Size  = size;
                var icon = new C1CompositeIcon();
                icon.Size = size;
                icon.Icons.Add(icon2);
                icon.Icons.Add(icon1);
                _newIcon = IconElement.CreateElement(icon);
            }
            _text.Text = value?.ToString();
        }
        // todo: use other images from Noela (better png)
        private void InitializeHomeSiteLinkButtons()
        {
            {   // Support
                var icon1 = new C1PathIcon();
                icon1.Data    = "M7.755,10.727c-0.457,0-0.828,0.381-0.828,0.838c0,0.447,0.359,0.839,0.828,0.839s0.838-0.392,0.838-0.839C8.593,11.107,8.212,10.727,7.755,10.727z";
                icon1.ViewBox = new Rectangle(0, 0, 16, 16);
                icon1.Size    = new Size(16, 16);
                var icon2 = new C1PathIcon();
                icon2.Data    = "M7.896,4.375c-1.469,0-2.145,0.871-2.145,1.46c0,0.425,0.359,0.621,0.652,0.621c0.59,0,0.35-0.839,1.461-0.839c0.543,0,0.98,0.239,0.98,0.74c0,0.588-0.611,0.926-0.971,1.23C7.56,7.861,7.146,8.308,7.146,9.244c0,0.566,0.152,0.73,0.6,0.73c0.533,0,0.643-0.24,0.643-0.447c0-0.566,0.01-0.893,0.609-1.361c0.295-0.229,1.219-0.97,1.219-1.993C10.216,5.148,9.292,4.375,7.896,4.375z";
                icon2.ViewBox = new Rectangle(0, 0, 16, 16);
                icon2.Size    = new Size(16, 16);
                var icon3 = new C1PathIcon();
                icon3.Data    = "M7.999,0c-4.42,0-8,3.578-8,8v7.375C-0.001,15.721,0.28,16,0.626,16h7.373c4.422,0,8.002-3.578,8.002-8C16.001,3.579,12.421,0,7.999,0z M7.999,14.75h-6.75V8c0-3.73,3.02-6.75,6.75-6.75c3.732,0,6.75,3.02,6.75,6.75S11.731,14.75,7.999,14.75z";
                icon3.ViewBox = new Rectangle(0, 0, 16, 16);
                icon3.Size    = new Size(16, 16);
                var cicon = new C1CompositeIcon();
                cicon.Size = new Size(16, 16);
                cicon.Icons.Add(icon3);
                cicon.Icons.Add(icon2);
                cicon.Icons.Add(icon1);
                btnSupport.Icon = cicon;
            }

            {   // About
                var           icon1  = new C1PolygonIcon();
                List <PointF> points = new List <PointF>();
                points.Add(new PointF(8.842999f, 5.088f));
                points.Add(new PointF(8.842999f, 5.55357552f));
                points.Add(new PointF(8.465575f, 5.93099976f));
                points.Add(new PointF(8f, 5.93099976f));
                points.Add(new PointF(7.534424f, 5.93099976f));
                points.Add(new PointF(7.15699959f, 5.55357552f));
                points.Add(new PointF(7.15699959f, 5.088f));
                points.Add(new PointF(7.15699959f, 4.62242365f));
                points.Add(new PointF(7.534424f, 4.24499941f));
                points.Add(new PointF(8f, 4.24499941f));
                points.Add(new PointF(8.465575f, 4.24499941f));
                points.Add(new PointF(8.842999f, 4.62242365f));
                points.Add(new PointF(8.842999f, 5.088f));
                icon1.Points   = points.ToArray();
                icon1.IsClosed = true;
                icon1.ViewBox  = new Rectangle(0, 0, 16, 16);
                icon1.Size     = new Size(16, 16);

                var icon2 = new C1PathIcon();
                icon2.Data    = "M8,0C3.578,0,0,3.578,0,8s3.578,8,8,8s8-3.578,8-8S12.422,0,8,0z M8,14.75c-3.73,0-6.75-3.02-6.75-6.75c0-3.731,3.02-6.75,6.75-6.75c3.732,0,6.75,3.02,6.75,6.75S11.732,14.75,8,14.75z";
                icon2.ViewBox = new Rectangle(0, 0, 16, 16);
                icon2.Size    = new Size(16, 16);
                var icon3 = new C1PathIcon();
                icon3.Data    = "M8,6.697c-0.344,0-0.625,0.279-0.625,0.625v4.025c0,0.346,0.281,0.625,0.625,0.625c0.346,0,0.625-0.279,0.625-0.625V7.322C8.625,6.977,8.346,6.697,8,6.697z";
                icon3.ViewBox = new Rectangle(0, 0, 16, 16);
                icon3.Size    = new Size(16, 16);
                var cicon = new C1CompositeIcon();
                cicon.Size = new Size(16, 16);
                cicon.Icons.Add(icon3);
                cicon.Icons.Add(icon2);
                cicon.Icons.Add(icon1);
                btnAbout.Icon = cicon;
            }

            {   // Pricing
                var icon1 = new C1PathIcon();
                icon1.Data    = "M15,0.5H1c-0.551,0-1,0.447-1,1v9c0,0.553,0.449,1,1,1h14c0.553,0,1-0.447,1-1v-9C16,0.947,15.553,0.5,15,0.5z M15,10.5H1v-9h14V10.5z";
                icon1.ViewBox = new Rectangle(0, 0, 16, 16);
                icon1.Size    = new Size(16, 16);
                var icon2 = new C1PathIcon();
                icon2.Data    = "M8,9c1.658,0,3-1.344,3-3S9.658,3,8,3C6.344,3,5,4.344,5,6S6.344,9,8,9z M8,4c1.105,0,2.002,0.896,2.002,2S9.105,8,8,8C6.896,8,6.002,7.104,6.002,6S6.896,4,8,4z";
                icon2.ViewBox = new Rectangle(0, 0, 16, 16);
                icon2.Size    = new Size(16, 16);

                GraphicsPath path = new GraphicsPath();
                path.AddRectangle(new RectangleF(2.502f, 5.5f, 0.998f, 1));
                var Points = path.PathPoints;

                var           icon3  = new C1PolygonIcon();
                List <PointF> points = new List <PointF>();
                points.Add(new PointF(2.5f, 5.5f));
                points.Add(new PointF(3.5f, 5.5f));
                points.Add(new PointF(3.5f, 6.5f));
                points.Add(new PointF(2.5f, 6.5f));
                icon3.Points   = points.ToArray();
                icon3.IsClosed = true;
                icon3.ViewBox  = new Rectangle(0, 0, 16, 16);
                icon3.Size     = new Size(16, 16);

                var icon4 = new C1PolygonIcon();
                points = new List <PointF>();
                points.Add(new PointF(12.5f, 5.5f));
                points.Add(new PointF(13.5f, 5.5f));
                points.Add(new PointF(13.5f, 6.5f));
                points.Add(new PointF(12.5f, 6.5f));
                icon4.Points   = points.ToArray();
                icon4.IsClosed = true;
                icon4.ViewBox  = new Rectangle(0, 0, 16, 16);
                icon4.Size     = new Size(16, 16);

                var icon5 = new C1PathIcon();
                icon5.Data    = "M0.5,12.5H0c0,0.553,0.449,1,1,1h14c0.553,0,1-0.447,1-1H1H0.5z";
                icon5.ViewBox = new Rectangle(0, 0, 16, 16);
                icon5.Size    = new Size(16, 16);
                var icon6 = new C1PathIcon();
                icon6.Data    = "M0.5,14.5H0c0,0.553,0.449,1,1,1h14c0.553,0,1-0.447,1-1H1H0.5z";
                icon6.ViewBox = new Rectangle(0, 0, 16, 16);
                icon6.Size    = new Size(16, 16);
                var cicon = new C1CompositeIcon();
                cicon.Size = new Size(16, 16);
                cicon.Icons.Add(icon2);
                cicon.Icons.Add(icon1);
                cicon.Icons.Add(icon3);
                cicon.Icons.Add(icon4);
                cicon.Icons.Add(icon5);
                cicon.Icons.Add(icon6);
                btnPricing.Icon = cicon;
            }
        }