set
{
SetValue(SizeWidthProperty, value);
- WidthSpecification = (int)Math.Ceiling(value);
NotifyPropertyChanged();
}
}
set
{
SetValue(SizeHeightProperty, value);
- HeightSpecification = (int)Math.Ceiling(value);
NotifyPropertyChanged();
}
}
set
{
SetValue(WidthResizePolicyProperty, value);
- // Match ResizePolicy to new Layouting.
- // Parent relative policies can not be mapped at this point as parent size unknown.
- switch (value)
- {
- case ResizePolicyType.UseNaturalSize:
- {
- WidthSpecification = LayoutParamPolicies.WrapContent;
- break;
- }
- case ResizePolicyType.FillToParent:
- {
- WidthSpecification = LayoutParamPolicies.MatchParent;
- break;
- }
- case ResizePolicyType.FitToChildren:
- {
- WidthSpecification = LayoutParamPolicies.WrapContent;
- break;
- }
- default:
- break;
- }
NotifyPropertyChanged();
}
}
set
{
SetValue(HeightResizePolicyProperty, value);
- // Match ResizePolicy to new Layouting.
- // Parent relative policies can not be mapped at this point as parent size unknown.
- switch (value)
- {
- case ResizePolicyType.UseNaturalSize:
- {
- HeightSpecification = LayoutParamPolicies.WrapContent;
- break;
- }
- case ResizePolicyType.FillToParent:
- {
- HeightSpecification = LayoutParamPolicies.MatchParent;
- break;
- }
- case ResizePolicyType.FitToChildren:
- {
- HeightSpecification = LayoutParamPolicies.WrapContent;
- break;
- }
- default:
- break;
- }
NotifyPropertyChanged();
}
}
get
{
// If View has a Layout then padding in stored in the base Layout class
- if (Layout !=null)
+ if (Layout != null)
{
return Layout.Padding;
}
set
{
SetValue(SizeProperty, value);
- // Set Specification so when layouts measure this View it matches the value set here.
- // All Views are currently Layouts.
- WidthSpecification = (int)Math.Ceiling(value.Width);
- HeightSpecification = (int)Math.Ceiling(value.Height);
NotifyPropertyChanged();
}
}
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
+ view.WidthSpecification = (int)System.Math.Ceiling((float)newValue);
}
},
defaultValueCreator: (bindable) =>
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
+ view.HeightSpecification = (int)System.Math.Ceiling((float)newValue);
}
},
defaultValueCreator: (bindable) =>
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
+ // Match ResizePolicy to new Layouting.
+ // Parent relative policies can not be mapped at this point as parent size unknown.
+ switch ((ResizePolicyType)newValue)
+ {
+ case ResizePolicyType.UseNaturalSize:
+ {
+ view.WidthSpecification = LayoutParamPolicies.WrapContent;
+ break;
+ }
+ case ResizePolicyType.FillToParent:
+ {
+ view.WidthSpecification = LayoutParamPolicies.MatchParent;
+ break;
+ }
+ case ResizePolicyType.FitToChildren:
+ {
+ view.WidthSpecification = LayoutParamPolicies.WrapContent;
+ break;
+ }
+ default:
+ break;
+ }
}
},
defaultValueCreator: (bindable) =>
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
+ // Match ResizePolicy to new Layouting.
+ // Parent relative policies can not be mapped at this point as parent size unknown.
+ switch ((ResizePolicyType)newValue)
+ {
+ case ResizePolicyType.UseNaturalSize:
+ {
+ view.HeightSpecification = LayoutParamPolicies.WrapContent;
+ break;
+ }
+ case ResizePolicyType.FillToParent:
+ {
+ view.HeightSpecification = LayoutParamPolicies.MatchParent;
+ break;
+ }
+ case ResizePolicyType.FitToChildren:
+ {
+ view.HeightSpecification = LayoutParamPolicies.WrapContent;
+ break;
+ }
+ default:
+ break;
+ }
}
},
defaultValueCreator: (bindable) =>
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
+ Size size = (Size)newValue;
+ Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(size));
+ // Set Specification so when layouts measure this View it matches the value set here.
+ // All Views are currently Layouts.
+ view.WidthSpecification = (int)System.Math.Ceiling(size.Width);
+ view.HeightSpecification = (int)System.Math.Ceiling(size.Height);
}
},
defaultValueCreator: (bindable) =>