if (newValue != null)
{
Size size = (Size)newValue;
- instance.Style.Size = size;
+ ((View)bindable).Size = size;
if (null != instance.imageVisual)
{
instance.imageVisual.Size = new Size2D((int)size.Width, (int)size.Height);
if (newValue != null)
{
int frameRate = (int)newValue;
- if (0 != frameRate) //It will crash if 0
+ if (0 != frameRate) //It will crash if 0
{
instance.Style.FrameRate.All = frameRate;
instance.imageVisual.FrameDelay = 1000.0f / frameRate;
}
set
{
- SetValue(SizeProperty, value);
+ SetValue(SizeProperty, value);
}
}
URLS = new List<string>(),
FrameDelay = 16.6f,
LoopCount = -1,
- Size = new Size2D(100, 100),
Position = new Vector2(0, 0),
Origin = Visual.AlignType.Center,
AnchorPoint = Visual.AlignType.Center
}
if (null != Style.LoadingSize)
{
- imageVisual.Size = new Size2D((int)Style.LoadingSize.Width, (int)Style.LoadingSize.Height);
+ this.Size = new Size2D((int)Style.LoadingSize.Width, (int)Style.LoadingSize.Height);
}
}
}
styleMap.Add(typeof(Switch), GetSwitchStyle);
styleMap.Add(typeof(Tab), GetTabStyle);
styleMap.Add(typeof(Toast), GetToastStyle);
+ styleMap.Add(typeof(Loading), GetLoadingStyle);
}
internal delegate ViewStyle ComponentStyleGetter();
protected abstract TabStyle GetTabStyle();
protected abstract ToastStyle GetToastStyle();
+
+ protected abstract LoadingStyle GetLoadingStyle();
}
}