A grouping of widget for use in the UI. Used to group similar purpose widgets together for ease of use.
Пример #1
0
        private Widget UpdateWidgetCollectionWithNewAddition(Widget baseWidget)
        {
            var widgetGroup = WidgetGroups.FirstOrDefault(group => @group.Heading == baseWidget.Category);
            if (widgetGroup == null)
            {
                widgetGroup = new WidgetGroup
                {
                    Heading = baseWidget.Category,
                    Widgets = new ObservableCollection<Widget>()
                };
                WidgetGroups.Add(widgetGroup);
            }

            widgetGroup.Widgets.Add(baseWidget);
            UpdateAllWidgets();
            return baseWidget;
        }