Exemple #1
0
 void initBottonView(BGItemView button)
 {
     button.BorderWidth = 2;
     button.Background  = new SolidColorBrush(Color.FromRgb(252, 128, 128));
     button.FontColor   = new SolidColorBrush(Color.FromRgb(255, 255, 255));
     button.FontSize    = 14;
 }
Exemple #2
0
        BGView <StringItem> createButton(hoshi_lib.Pair <string, IBGO> data)
        {
            var        sys    = BGSystem.Instance;
            BGItemView button = new BGItemView(data.B);

            //button.BGData = data.A;
            button.MouseDown += (s, e) => data.B.Select();

            initBottonView(button);
            //Set Text and Size
            button.Text   = button.BGData.Text;
            button.Margin = new System.Windows.Thickness(5, 0, 5, 0);
            var width = 40 + button.BGData.Text.Count() * button.FontSize / 2;

            button.Size = new hoshi_lib.Size(width, 40);

            return(button);
        }