Interaction logic for CommandButton.xaml
Inheritance: System.Windows.Controls.UserControl
コード例 #1
0
ファイル: CommandBar.cs プロジェクト: abombss/storyteller
 public void AddCommand(string text, ICommand command, Icon icon)
 {
     var button = new CommandButton(icon, text, command);
     Children.Add(button);
     //this.Add<Button>(x =>
     //{
     //    x.ToIconButton(icon, command).Text(text);
     //    x.VerticalAlignment = VerticalAlignment.Stretch;
     //    x.Height = 30;
     //    x.Margin = new Thickness(5, 0, 5, 0);
     //    x.HorizontalAlignment = HorizontalAlignment.Right;
     //});
 }
コード例 #2
0
        public void AddCommand(string text, ICommand command, Icon icon)
        {
            var button = new CommandButton(icon, text, command);

            Children.Add(button);
            //this.Add<Button>(x =>
            //{
            //    x.ToIconButton(icon, command).Text(text);
            //    x.VerticalAlignment = VerticalAlignment.Stretch;
            //    x.Height = 30;
            //    x.Margin = new Thickness(5, 0, 5, 0);
            //    x.HorizontalAlignment = HorizontalAlignment.Right;
            //});
        }