Since we can take the size value using `Size2DProperty`, we don't need to
save Size2D value in local value.
It will save a bit of memory.
/// <since_tizen> 3 </since_tizen>
public new virtual Size2D GetNaturalSize()
{
- return sizeSetExplicitly; // Returns the size set explicitly on View unless Overridden.
+ return (Size2D)GetValue(Size2DProperty);
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public partial class View : Container, IResourcesProvider
{
- internal Size2D sizeSetExplicitly = new Size2D(); // Store size set by API, will be used in place of NaturalSize if not set.
internal BackgroundExtraData backgroundExtraData;
private bool layoutSet = false;
}
set
{
- sizeSetExplicitly = value; // Store size set by API, will be used in place of NaturalSize if not set.
SetValue(Size2DProperty, value);
widthPolicy = value.Width;