Ejemplo n.º 1
0
        internal virtual void UpdateCornerRadius(float value, bool needToListenStateChanged)
        {
            ControlStateChangeEventInternal -= OnControlStateChangedForCornerRadius;

            if (needToListenStateChanged)
            {
                ControlStateChangeEventInternal += OnControlStateChangedForCornerRadius;
            }

            if (value != 0)
            {
                (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).CornerRadius = value;
            }

            Tizen.NUI.PropertyMap backgroundMap = new Tizen.NUI.PropertyMap();
            Tizen.NUI.Object.GetProperty(swigCPtr, View.Property.BACKGROUND).Get(backgroundMap);

            if (!backgroundMap.Empty())
            {
                backgroundMap[Visual.Property.CornerRadius] = new PropertyValue(value);
                Tizen.NUI.Object.SetProperty(swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(backgroundMap));
            }

            UpdateShadowCornerRadius(value);
        }
Ejemplo n.º 2
0
        private void ApplyCornerRadius()
        {
            Tizen.NUI.PropertyMap backgroundMap = new Tizen.NUI.PropertyMap();
            Tizen.NUI.Object.GetProperty(swigCPtr, View.Property.BACKGROUND).Get(backgroundMap);

            if (!backgroundMap.Empty())
            {
                // TODO (NDalic.VISUAL_PROPERTY_MIX_COLOR + 3) to CornerRadius
                backgroundMap[Visual.Property.CornerRadius] = new PropertyValue(cornerRadius.GetValue() ?? 0);
                Tizen.NUI.Object.SetProperty(swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(backgroundMap));
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates an animation to animate the background color visual. If there is no
        /// background visual, creates one with transparent black as it's mixColor.
        /// </summary>
        /// <since_tizen> 3 </since_tizen>
        public Animation AnimateBackgroundColor(object destinationValue,
                                                int startTime,
                                                int endTime,
                                                AlphaFunction.BuiltinFunctions?alphaFunction = null,
                                                object initialValue = null)
        {
            Tizen.NUI.PropertyMap background = Background;

            if (background.Empty())
            {
                // If there is no background yet, ensure there is a transparent
                // color visual
                BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
                background      = Background;
            }
            return(AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue));
        }
Ejemplo n.º 4
0
        internal virtual void UpdateCornerRadius(float value)
        {
            if (value != 0)
            {
                (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).CornerRadius = value;
            }

            Tizen.NUI.PropertyMap backgroundMap = new Tizen.NUI.PropertyMap();
            Tizen.NUI.Object.GetProperty(swigCPtr, View.Property.BACKGROUND).Get(backgroundMap);

            if (!backgroundMap.Empty())
            {
                backgroundMap[Visual.Property.CornerRadius] = new PropertyValue(value);
                Tizen.NUI.Object.SetProperty(swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue(backgroundMap));
            }

            UpdateShadowCornerRadius(value);
        }