Inheritance: System.Windows.Controls.UserControl
示例#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();
        }
 private void RenderServices(SelectServiceButton[] services, int cols, int rows)
 {
     OnRenderServices(this, new RenderServicesEventArgs()
     {
         Services = services,
         Cols = cols,
         Rows = rows
     });
 }
        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;
        }