示例#1
0
        void ApplyTintColor()
        {
            if (!Control.IsAlive() || Element == null)
            {
                return;
            }

            var color = IconTintColorEffect.GetTintColor(Element);

            switch (Control)
            {
            case ImageView image:
                SetImageViewTintColor(image, color);
                break;

            case Button button:
                SetButtonTintColor(button, color);
                break;
            }
        }
        void ApplyTintColor()
        {
            if (Control == null || Element == null || !(Element is VisualElement))
            {
                return;
            }

            var color = IconTintColorEffect.GetTintColor(Element);

            switch (Control)
            {
            case UIImageView imageView:
                SetUIImageViewTintColor(imageView, color);
                break;

            case UIButton button:
                SetUIButtonTintColor(button, color);
                break;
            }
        }