Пример #1
0
        private void CreateButton(ViewDefinition definition)
        {
            var button = CreateButton();

            button.Name     = definition.Name;
            button.Text     = definition.TextName;
            button.ImageSrc = definition.ImageSrc;
            button.MouseUp += definition.RaiseButtonMouseUp;
            button.Init(_container);
            _panel.Children.Add(button);
            _buttons.Add(button);

            if (definition.HiddenMenu)
            {
                button.Visibility = Visibility.Collapsed;
            }
        }
Пример #2
0
 protected void AddDefinition(ViewDefinition definition)
 {
     _owner.ViewDefinitions.Add(definition);
     CreateButton(definition);
 }