main
 1using System.Windows.Controls;
 2using System.Windows.Controls.Primitives;
 3using gorilla.utility;
 4
 5namespace solidware.financials.windows.ui.views.controls
 6{
 7    public class ButtonExpression
 8    {
 9        ButtonBase button;
10
11        public ButtonExpression(ButtonBase button)
12        {
13            this.button = button;
14        }
15
16        public void Text(string text)
17        {
18            var panel = new StackPanel
19                        {
20                            Orientation = Orientation.Horizontal
21                        };
22            var image = button.Content.downcast_to<Image>();
23            button.Content = panel;
24            panel.Children.Add(image);
25            panel.Children.Add(new Label
26                               {
27                                   Content = text
28                               });
29        }
30    }
31}