private static void OnItemsSourceChanged(BindableObject bindable, object oldValue, object newValue)
        {
            var control = (MaterialChipsGroup)bindable;

            control.stcContainer.Children.Clear();
            if (!Equals(newValue, null) && newValue is IEnumerable)
            {
                foreach (var item in (IEnumerable)newValue)
                {
                    var materialChips = new MaterialChips
                    {
                        HorizontalOptions = LayoutOptions.FillAndExpand,
                        Text                            = item.ToString(),
                        FontSize                        = control.FontSize,
                        FontFamily                      = control.FontFamily,
                        CornerRadius                    = control.CornerRadius,
                        Padding                         = control.Padding,
                        BackgroundColor                 = control.BackgroundColor,
                        TextColor                       = control.TextColor,
                        SelectedBackgroundColor         = control.SelectedBackgroundColor,
                        SelectedTextColor               = control.SelectedTextColor,
                        DisabledBackgroundColor         = control.DisabledBackgroundColor,
                        DisabledTextColor               = control.DisabledTextColor,
                        DisabledSelectedBackgroundColor = control.DisabledSelectedBackgroundColor,
                        DisabledSelectedTextColor       = control.DisabledSelectedTextColor
                    };
                    if (control.SelectedItem != null)
                    {
                        materialChips.IsSelected = materialChips.Text.Equals(control.SelectedItem);
                    }
                    materialChips.IsSelectedChanged += control.MaterialChips_IsSelectedChanged;
                    control.stcContainer.Children.Add(materialChips);
                }
            }
        }
        private static void OnItemsSourceChanged(BindableObject bindable, object oldValue, object newValue)
        {
            var control = (MaterialChipsGroup)bindable;

            control.flexContainer.Children.Clear();
            if (!Equals(newValue, null) && newValue is IEnumerable)
            {
                foreach (var item in (IEnumerable)newValue)
                {
                    // TODO: apply ChipsFlexLayoutBasis???

                    var materialChips = new MaterialChips
                    {
                        HorizontalOptions = LayoutOptions.FillAndExpand,
                        Text                            = item.ToString(),
                        FontSize                        = control.FontSize,
                        FontFamily                      = control.FontFamily,
                        CornerRadius                    = control.CornerRadius,
                        Padding                         = control.ChipsPadding,
                        Margin                          = control.ChipsMargin,
                        BackgroundColor                 = control.BackgroundColor,
                        TextColor                       = control.TextColor,
                        SelectedBackgroundColor         = control.SelectedBackgroundColor,
                        SelectedTextColor               = control.SelectedTextColor,
                        DisabledBackgroundColor         = control.DisabledBackgroundColor,
                        DisabledTextColor               = control.DisabledTextColor,
                        DisabledSelectedBackgroundColor = control.DisabledSelectedBackgroundColor,
                        DisabledSelectedTextColor       = control.DisabledSelectedTextColor
                    };

                    if (control.IsMultipleSelection)
                    {
                        if (control.SelectedItems != null && control.SelectedItems.Any())
                        {
                            materialChips.IsSelected = control.SelectedItems.Contains(materialChips.Text);
                        }
                    }
                    else
                    {
                        if (control.SelectedItem != null)
                        {
                            materialChips.IsSelected = materialChips.Text.Equals(control.SelectedItem);
                        }
                    }

                    materialChips.IsSelectedChanged += control.MaterialChips_IsSelectedChanged;
                    control.flexContainer.Children.Add(materialChips);

                    if (control.ChipsFlexLayoutPercentageBasis > 0 && control.ChipsFlexLayoutPercentageBasis <= 1)
                    {
                        FlexLayout.SetBasis(materialChips, new FlexBasis((float)control.ChipsFlexLayoutPercentageBasis, true));
                    }
                }
            }
        }