Exemple #1
0
        private void SetSideRail(string title, IEnumerable <UIElement> controls)
        {
            SelectedItemButton.Content = title;

            SideRail.Children.Clear();

            var propertiesLabel = new TextBlock
            {
                Text          = "Properties",
                FontSize      = 10,
                Height        = 20,
                TextAlignment = TextAlignment.Center,
                Margin        = new Thickness(0, 2, 0, 0)
            };

            SideRail.Children.Add(propertiesLabel);
            SideRail.Children.Add(SideRailContentGenerator.GenerateSeperator(1));

            foreach (var control in controls)
            {
                SideRail.Children.Add(control);
            }

            SideRail.Children.Add(SideRailContentGenerator.GenerateSeperator(1));
        }
 public override void SetSideRail(SetSideRailDelegate sideRailSetter)
 {
     if (_sideRailControls == null)
     {
         _sideRailControls = new List <UIElement>();
         _sideRailControls.Add(new LabeledControlSideRailContainer("New graphic name", _channelNameTextBox, Orientation.Horizontal, 150));
         _sideRailControls.Add(new LabeledControlSideRailContainer(string.Empty, _addChannelButton, Orientation.Horizontal, 0));
         _sideRailControls.Add(SideRailContentGenerator.GenerateSeperator(1));
         _sideRailControls.Add(new LabeledControlSideRailContainer("Graphics list", _channelsListBox, Orientation.Vertical, 300));
         _sideRailControls.Add(SideRailContentGenerator.GenerateSeperator(1));
         _sideRailControls.Add(new LabeledControlSideRailContainer("Color", _colorPicker, Orientation.Horizontal, 200));
         _sideRailControls.Add(new LabeledControlSideRailContainer("Graphic editor", _ledDisplay, Orientation.Vertical, 152));
     }
     sideRailSetter.Invoke(ItemName, _sideRailControls);
 }