Inheritance: System.Windows.Controls.UserControl
Esempio n. 1
0
        public void UpdateServices(SelectServiceButton[] services, int cols, int rows)
        {
            this.services = services;
            this.cols = cols;
            this.rows = rows;
            this.servicesPerPage = cols * rows;

            Update();
        }
Esempio n. 2
0
 private void RenderServices(SelectServiceButton[] services, int cols, int rows)
 {
     OnRenderServices(this, new RenderServicesEventArgs()
     {
         Services = services,
         Cols = cols,
         Rows = rows
     });
 }
Esempio n. 3
0
        private SelectServiceButton CreateSelectServiceButton(string code, string name, string color, float fontSize, EventHandler onSelected)
        {
            var model = new ServiceButtonViewModel()
            {
                Code = code,
                Name = name,
                FontSize = fontSize == 0 ? 1 : fontSize,
                ServiceBrush = color.GetBrushForColor()
            };
            model.OnServiceSelected += onSelected;

            var result = new SelectServiceButton();
            result.DataContext = model;
            return result;
        }