Esempio 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);
        }
Esempio 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));
            }
        }
Esempio 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));
        }
Esempio 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);
        }
Esempio n. 5
0
 /// <summary>
 /// Sets the background with a property map.
 /// </summary>
 /// <param name="map">The background property map.</param>
 /// <since_tizen> 3 </since_tizen>
 public void SetBackground(Tizen.NUI.PropertyMap map)
 {
     viewWrapperImpl.SetBackground(map);
 }