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); }
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); }
public void BackgroundExtraDataConstructor() { tlog.Debug(tag, $"BackgroundExtraDataConstructor START"); View view = new View(); view.backgroundExtraData = new BackgroundExtraData() { BackgroundImageBorder = new Rectangle(5, 5, 5, 5), CornerRadius = new Vector4(1.0f, 2.0f, 3.0f, 4.0f), CornerRadiusPolicy = VisualTransformPolicyType.Relative, BorderlineWidth = 0.3f, BorderlineColor = Color.Red, BorderlineOffset = 1.5f }; var testingTarget = new BackgroundExtraData(view.backgroundExtraData); Assert.AreEqual(0.3f, testingTarget.BorderlineWidth, "Should be equal!"); testingTarget.Dispose(); tlog.Debug(tag, $"BackgroundExtraDataConstructor END (OK)"); }
internal BackgroundExtraData(BackgroundExtraData other) { BackgroundImageBorder = other.BackgroundImageBorder; CornerRadius = other.CornerRadius; }