data.IsSelected = false;
}
DropDownItemView listItemView = dropDownMenuFullList.GetChildAt((uint)selectedItemIndex) as DropDownItemView;
-
- SetListItemToSelected(listItemView);
+ if (listItemView != null)
+ {
+ SetListItemToSelected(listItemView);
+ }
}
if (index != -1)
}
set
{
- if (null == itemDataStyle?.BackgroundColor)
+ if (null != itemDataStyle)
{
- itemDataStyle.BackgroundColor = new Selector<Color>();
- }
+ if (null == itemDataStyle.BackgroundColor)
+ {
+ itemDataStyle.BackgroundColor = new Selector<Color>();
+ }
- itemDataStyle.BackgroundColor.Clone(value);
+ itemDataStyle.BackgroundColor.Clone(value);
+ }
}
}
return;
}
DropDownItemView listItemView = holder.ItemView as DropDownItemView;
- listItemView.Name = "Item" + position;
if (listItemData.Size != null)
{
if (listItemData.Size.Width > 0)
if (listItemView != null)
{
+ listItemView.Name = "Item" + position;
listItemView.BackgroundColorSelector = listItemData.BackgroundColor;
if (listItemData.Text != null)
{
string result = value.ToString();
FieldInfo info = typeof(T).GetField(result);
var attributes = info.GetCustomAttributes(typeof(DescriptionAttribute), true);
- if (null != attributes?.FirstOrDefault())
+ if (null != attributes?.FirstOrDefault() && null != (attributes.First() as DescriptionAttribute))
{
result = (attributes.First() as DescriptionAttribute).Description;
}
if (layoutParent != null)
{
LayoutGroup layoutGroup = layoutParent as LayoutGroup;
- if(! layoutGroup.LayoutRequested)
+ if(layoutGroup != null && !layoutGroup.LayoutRequested)
{
layoutGroup.RequestLayout();
}
for (uint i = 0; i < rootNode.ChildCount; i++)
{
View view = rootNode.GetChildAt(i);
- FindRootLayouts(view);
+ if (view != null)
+ {
+ FindRootLayouts(view);
+ }
}
}
}
for (uint i = 0; i < layer.ChildCount; i++)
{
View view = layer.GetChildAt(i);
- FindRootLayouts(view);
+ if (view != null)
+ {
+ FindRootLayouts(view);
+ }
}
}
}
var queue = new Queue<Element>(16);
queue.Enqueue((Element)self);
- while (queue.Count > 0)
+ while (queue.Count > 0 && queue.Dequeue() != null)
{
ReadOnlyCollection<Element> children = queue.Dequeue().LogicalChildrenInternal;
for (var i = 0; i < children.Count; i++)
{
RegisterComponent(component.Key, component.Value);
}
- (Backend as NUIComponentCoreBackend).ComponentFactories = _componentFactories;
+ if ((Backend as NUIComponentCoreBackend) != null)
+ {
+ (Backend as NUIComponentCoreBackend).ComponentFactories = _componentFactories;
+ }
}
/// <summary>
_outputVisualMap = new PropertyMap();
_outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color));
_outputVisualMap.Add(ColorVisualProperty.MixColor, new PropertyValue(_mixColorForColorVisual));
- if (_shader != null) { _outputVisualMap.Add(Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add(Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_opacity != null) { _outputVisualMap.Add(Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
- if (_renderIfTransparent != null) { _outputVisualMap.Add(ColorVisualProperty.RenderIfTransparent, new PropertyValue((bool)_renderIfTransparent)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add(Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ base.ComposingPropertyMap();
}
}
}
if (_bevelPercentage != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelPercentage, new PropertyValue((float)_bevelPercentage)); }
if (_bevelSmoothness != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelSmoothness, new PropertyValue((float)_bevelSmoothness)); }
if (_lightPosition != null) { _outputVisualMap.Add(PrimitiveVisualProperty.LightPosition, new PropertyValue(_lightPosition)); }
- if (_shader != null) { _outputVisualMap.Add(Visual.Property.Shader, new PropertyValue(_shader)); }
- if (_premultipliedAlpha != null) { _outputVisualMap.Add(Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
- if (_opacity != null) { _outputVisualMap.Add(Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
- if (_visualFittingMode != null) { _outputVisualMap.Add(Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode)); }
+ base.ComposingPropertyMap();
}
}
}
_transition.Add("animator", new PropertyValue(_animator));
_outputVisualMap = _transition;
+ base.ComposingPropertyMap();
}
}
//temporary fix for TCT
while (delayQueue.Count > 0)
{
SetValueArgs s = delayQueue.Dequeue();
- SetValueActual(s.Property, s.Context, s.Value, s.CurrentlyApplying, forceSendChangeSignal, s.Attributes);
+ if (s != null)
+ {
+ SetValueActual(s.Property, s.Context, s.Value, s.CurrentlyApplying, forceSendChangeSignal, s.Attributes);
+ }
}
context.DelayedSetters = null;
var queue = new Queue<Element>(16);
queue.Enqueue(this);
- while (queue.Count > 0)
+ while (queue.Count > 0 && queue.Dequeue() != null)
{
ReadOnlyCollection<Element> children = queue.Dequeue().LogicalChildrenInternal;
for (var i = 0; i < children.Count; i++)
var queue = new Queue<Element>(16);
queue.Enqueue(this);
- while (queue.Count > 0)
+ while (queue.Count > 0 && queue.Dequeue() != null)
{
ReadOnlyCollection<Element> children = queue.Dequeue().LogicalChildrenInternal;
for (var i = 0; i < children.Count; i++)