// we add 1000, just incase View class starts using animatable properties
int startAnimatablePropertyIndex = (int)Tizen.NUI.PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + maxCountPerDerivation;
- while (viewType.GetTypeInfo().BaseType?.Name != "CustomView") // custom view is our C# view base class. we don't go any deeper.
+ if (viewType != null)
{
- // for every base class increase property start index
- startEventPropertyIndex += (int)Tizen.NUI.PropertyRanges.DEFAULT_PROPERTY_MAX_COUNT_PER_DERIVATION; // DALi uses 10,000
- startAnimatablePropertyIndex += maxCountPerDerivation;
- NUILog.Debug("getStartPropertyIndex = " + viewType.Name + "current index " + startEventPropertyIndex);
- viewType = viewType.GetTypeInfo().BaseType;
+ while (viewType.GetTypeInfo().BaseType?.Name != "CustomView") // custom view is our C# view base class. we don't go any deeper.
+ {
+ // for every base class increase property start index
+ startEventPropertyIndex += (int)Tizen.NUI.PropertyRanges.DEFAULT_PROPERTY_MAX_COUNT_PER_DERIVATION; // DALi uses 10,000
+ startAnimatablePropertyIndex += maxCountPerDerivation;
+ NUILog.Debug("getStartPropertyIndex = " + viewType.Name + "current index " + startEventPropertyIndex);
+ viewType = viewType.GetTypeInfo().BaseType;
+ }
}
range.startEventIndex = startEventPropertyIndex;
[EditorBrowsable(EditorBrowsableState.Never)]
public void ChangeLayoutSiblingOrder(int order)
{
- var ownerParent = Owner.GetParent() as View;
- if (Owner != null && ownerParent != null)
+ if (Owner != null)
{
- var parent = ownerParent.Layout as LayoutGroup;
-
- if (parent != null && parent.LayoutChildren.Count > order)
+ var ownerParent = Owner.GetParent() as View;
+ if (ownerParent != null)
{
- parent.LayoutChildren.Remove(this);
- parent.LayoutChildren.Insert(order, this);
+ var parent = ownerParent.Layout as LayoutGroup;
+
+ if (parent != null && parent.LayoutChildren.Count > order)
+ {
+ parent.LayoutChildren.Remove(this);
+ parent.LayoutChildren.Insert(order, this);
+ }
}
}
-
RequestLayout();
}