if (null == scrollableBase || null == listBackgroundImage || null == dropDownMenuFullList) return;
if (null == ListBackgroundImage.Size) return;
// Resize and position scrolling list within the drop down list container. Can be used to position list in relation to the background image.
- scrollableBase.Size = ListBackgroundImage.Size - new Size((dropDownStyle.ListPadding.Start + dropDownStyle.ListPadding.End), (dropDownStyle.ListPadding.Top + dropDownStyle.ListPadding.Bottom), 0);
+ Size dropDownPaddingSize = new Size((dropDownStyle.ListPadding.Start + dropDownStyle.ListPadding.End), (dropDownStyle.ListPadding.Top + dropDownStyle.ListPadding.Bottom), 0);
+ scrollableBase.Size = ListBackgroundImage.Size - dropDownPaddingSize;
+ dropDownPaddingSize.Dispose();
scrollableBase.Position2D = new Position2D(dropDownStyle.ListPadding.Start, dropDownStyle.ListPadding.Top);
int listBackgroundImageX = 0;
Vector2 amounts = GetRectOfVisibleChildScrollAmount(parent, child);
float dx = amounts[0];
float dy = amounts[1];
+ amounts.Dispose();
if (dx != 0 || dy != 0)
{
if (dx != 0 && CanScrollHorizontally())
int childRight = (int)child.Right;
int childBottom = (int)child.Bottom;
- Extents offset = new Extents((ushort)Math.Min(0, childLeft - parentLeft),
- (ushort)Math.Max(0, childRight - parentRight),
- (ushort)Math.Min(0, childTop - parentTop),
- (ushort)Math.Max(0, childBottom - parentBottom));
+ var offsetStart = Math.Min(0, childLeft - parentLeft);
+ var offsetEnd = Math.Max(0, childRight - parentRight);
+ var offsetTop = Math.Min(0, childTop - parentTop);
+ var offsetBottom = Math.Max(0, childBottom - parentBottom);
- int dx = offset.Start != 0 ? offset.Start : Math.Min(childLeft - parentLeft, offset.End);
+ int dx = offsetStart != 0 ? offsetStart : Math.Min(childLeft - parentLeft, offsetEnd);
- int dy = offset.Top != 0 ? offset.Top : Math.Min(childTop - parentTop, offset.Bottom);
+ int dy = offsetTop != 0 ? offsetTop : Math.Min(childTop - parentTop, offsetBottom);
ret.X = -dx;
ret.Y = -dy;
[EditorBrowsable(EditorBrowsableState.Never)]
public void Play()
{
- this.DoAction(imageVisual.VisualIndex, Property.ACTION_PLAY, new PropertyValue(0));
+ PropertyValue attributes = new PropertyValue(0);
+ this.DoAction(imageVisual.VisualIndex, Property.ACTION_PLAY, attributes);
+ attributes.Dispose();
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void Pause()
{
- this.DoAction(imageVisual.VisualIndex, Property.ACTION_PAUSE, new PropertyValue(0));
+ PropertyValue attributes = new PropertyValue(0);
+ this.DoAction(imageVisual.VisualIndex, Property.ACTION_PAUSE, attributes);
+ attributes.Dispose();
}
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void Stop()
{
- this.DoAction(imageVisual.VisualIndex, Property.ACTION_STOP, new PropertyValue(0));
+ PropertyValue attributes = new PropertyValue(0);
+ this.DoAction(imageVisual.VisualIndex, Property.ACTION_STOP, attributes);
+ attributes.Dispose();
}
}
}
MixColor = (indicatorColor == null) ? new Color(1.0f, 1.0f, 1.0f, 0.5f) : indicatorColor,
Opacity = (indicatorColor == null) ? 0.5f : indicatorColor.A
};
- indicator.Position = new Position2D((int)(paginationStyle.IndicatorSize.Width + paginationStyle.IndicatorSpacing) * indicatorList.Count, 0);
+ indicator.Position = new Vector2((int)(paginationStyle.IndicatorSize.Width + paginationStyle.IndicatorSpacing) * indicatorList.Count, 0);
container.AddVisual("Indicator" + indicatorList.Count, indicator);
indicatorList.Add(indicator);
}
ImageVisual indicator = indicatorList[i];
indicator.URL = paginationStyle.IndicatorImageUrl.Normal;
indicator.Size = new Size2D((int)paginationStyle.IndicatorSize.Width, (int)paginationStyle.IndicatorSize.Height);
- indicator.Position = new Position2D((int)(paginationStyle.IndicatorSize.Width + paginationStyle.IndicatorSpacing) * i, 0);
+ indicator.Position = new Vector2((int)(paginationStyle.IndicatorSize.Width + paginationStyle.IndicatorSpacing) * i, 0);
}
if (lastIndicatorImageUrl != null && indicatorCount > 0)
public OverlayAnimationButtonStyle() : base()
{
CornerRadius = 10;
- BackgroundColor = new Color(0.3f, 0.3f, 0.3f, 0.5f);
+ BackgroundColor = new Selector<Color> { All = new Color(0.3f, 0.3f, 0.3f, 0.5f) };
// PositionUsesPivotPoint = true;
IconRelativeOrientation = Button.IconOrientation.Top;
Text = new TextLabelStyle
{
var keyFrames = new KeyFrames();
keyFrames.Add(0.0f, 0.0f);
- keyFrames.Add(0.25f, 1.0f, new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear));
- keyFrames.Add(1.0f, 0.0f, new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut));
+ AlphaFunction linear = new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear);
+ keyFrames.Add(0.25f, 1.0f, linear);
+ linear.Dispose();
+ AlphaFunction ease = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut);
+ keyFrames.Add(1.0f, 0.0f, ease);
+ ease.Dispose();
PressAnimation = new Animation(600);
PressAnimation.EndAction = Animation.EndActions.StopFinal;
PressAnimation.AnimateBetween(overlayImage, "Opacity", keyFrames);
- PressAnimation.AnimateTo(overlayImage, "Scale", new Vector3(1, 1, 1), 0, 600, new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut));
+ keyFrames.Dispose();
+ Vector3 vec = new Vector3(1, 1, 1);
+ AlphaFunction easeout = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut);
+ PressAnimation.AnimateTo(overlayImage, "Scale", vec, 0, 600, easeout);
+ vec.Dispose();
+ easeout.Dispose();
}
if (PressAnimation.State == Animation.States.Playing)