}
internal set
{
+ if (itemImage != null) Remove(itemImage);
itemImage = value;
+ if (itemImage != null)
+ {
+ //FIXME: User applied image's style can be overwritten!
+ if (ItemStyle != null) itemImage.ApplyStyle(ItemStyle.Image);
+ Add(itemImage);
+ itemImage.Relayout += OnImageRelayout;
+ }
layoutChanged = true;
}
}
}
set
{
- if (value == null)
- {
- Remove(itemBadge);
- }
+ if (itemBadge != null) Remove(itemBadge);
itemBadge = value;
if (itemBadge != null)
{
- itemBadge.ApplyStyle(ItemStyle.Badge);
+ //FIXME: User applied badge's style can be overwritten!
+ if (ItemStyle != null) itemBadge.ApplyStyle(ItemStyle.Badge);
Add(itemBadge);
}
layoutChanged = true;
}
set
{
+ if (itemIcon != null) Remove(itemIcon);
itemIcon = value;
+ if (itemIcon != null)
+ {
+ //FIXME: User applied icon's style can be overwritten!
+ if (ItemStyle != null) itemIcon.ApplyStyle(ItemStyle.Icon);
+ Add(itemIcon);
+ itemIcon.Relayout += OnIconRelayout;
+ }
+ layoutChanged = true;
}
}
{
if (itemExtra != null) Remove(itemExtra);
itemExtra = value;
- Add(itemExtra);
+ if (itemExtra != null)
+ {
+ //FIXME: User applied extra's style can be overwritten!
+ if (ItemStyle != null) itemExtra.ApplyStyle(ItemStyle.Extra);
+ Add(itemExtra);
+ }
+ layoutChanged = true;
}
}
}
set
{
+ if (itemIcon != null) Remove(itemIcon);
itemIcon = value;
+ if (itemIcon != null)
+ {
+ //FIXME: User applied icon's style can be overwritten!
+ if (ItemStyle != null) itemIcon.ApplyStyle(ItemStyle.Icon);
+ Add(itemIcon);
+ itemIcon.Relayout += OnIconRelayout;
+ }
+ layoutChanged = true;
}
}