public void MergeTheme(Theme theme)
{
if (theme != null)
{
Name = theme.Name;
if (theme.CellHeight != 0 && CellHeight != theme.CellHeight)
{
CellHeight = theme.CellHeight;
}
if (theme.CellBackgroundColor != null)
{
CellBackgroundColor = theme.CellBackgroundColor.Clone();
}
if (theme.CellBackgroundUri != null)
{
CellBackgroundUri = theme.CellBackgroundUri;
}
if (theme.CellBackgroundImage != null)
{
CellBackgroundImage = theme.CellBackgroundImage;
}
if (theme.TextFont != null)
{
TextFont = theme.TextFont.Clone();
}
if (theme.TextColor != null)
{
TextColor = theme.TextColor.Clone();
}
if (theme.TextShadowOffset != SizeF.Empty)
{
TextShadowOffset = theme.TextShadowOffset;
}
if (theme.TextShadowColor != null)
{
TextShadowColor = theme.TextShadowColor.Clone();
}
if (theme.TextHighlightColor != null)
{
TextHighlightColor = theme.TextHighlightColor.Clone();
}
TextAlignment = theme.TextAlignment;
if (theme.DetailTextFont != null)
{
DetailTextFont = theme.DetailTextFont.Clone();
}
if (theme.DetailTextColor != null)
{
DetailTextColor = theme.DetailTextColor.Clone();
}
if (theme.DetailTextShadowOffset != SizeF.Empty)
{
DetailTextShadowOffset = theme.DetailTextShadowOffset;
}
if (theme.DetailTextShadowColor != null)
{
DetailTextShadowColor = theme.DetailTextShadowColor.Clone();
}
if (theme.DetailTextHighlightColor != null)
{
DetailTextHighlightColor = theme.DetailTextHighlightColor.Clone();
}
DetailTextAlignment = theme.DetailTextAlignment;
if (theme.PlaceholderColor != null)
{
PlaceholderColor = theme.PlaceholderColor.Clone();
}
if (theme.PlaceholderAlignment != UITextAlignment.Right)
{
PlaceholderAlignment = theme.PlaceholderAlignment;
}
if (theme.SeparatorColor != null)
{
SeparatorColor = theme.SeparatorColor.Clone();
}
if (theme.SeparatorStyle.HasValue)
{
SeparatorStyle = theme.SeparatorStyle;
}
TableViewStyle = theme.TableViewStyle;
if (theme.BarStyle.HasValue)
{
BarStyle = theme.BarStyle;
}
if (theme.BarTintColor != null)
{
BarTintColor = theme.BarTintColor.Clone();
}
if (theme.BarImage != null)
{
BarImage = theme.BarImage;
}
if (theme.BarTranslucent)
{
BarTranslucent = theme.BarTranslucent;
}
HeaderTextAlignment = theme.HeaderTextAlignment;
if (theme.HeaderTextFont != null)
{
HeaderTextFont = theme.HeaderTextFont.Clone();
}
if (theme.HeaderTextColor != null)
{
HeaderTextColor = theme.HeaderTextColor.Clone();
}
if (theme.HeaderTextBackgroundColor != null)
{
HeaderTextBackgroundColor = theme.HeaderTextBackgroundColor.Clone();
}
if (theme.HeaderTextShadowOffset != SizeF.Empty)
{
HeaderTextShadowOffset = theme.HeaderTextShadowOffset;
}
if (theme.HeaderTextShadowColor != null)
{
HeaderTextShadowColor = theme.HeaderTextShadowColor.Clone();
}
if (theme.HeaderBackgroundColor != null)
{
HeaderBackgroundColor = theme.HeaderBackgroundColor.Clone();
}
FooterTextAlignment = theme.FooterTextAlignment;
if (theme.FooterTextFont != null)
{
FooterTextFont = theme.FooterTextFont.Clone();
}
if (theme.FooterTextColor != null)
{
FooterTextColor = theme.FooterTextColor.Clone();
}
if (theme.FooterTextBackgroundColor != null)
{
FooterTextBackgroundColor = theme.FooterTextBackgroundColor.Clone();
}
if (theme.FooterTextShadowOffset != SizeF.Empty)
{
FooterTextShadowOffset = theme.FooterTextShadowOffset;
}
if (theme.FooterTextShadowColor != null)
{
FooterTextShadowColor = theme.FooterTextShadowColor.Clone();
}
if (theme.FooterBackgroundColor != null)
{
FooterBackgroundColor = theme.FooterBackgroundColor.Clone();
}
if (theme.DrawCellViewAction != null)
{
DrawCellViewAction = theme.DrawCellViewAction;
}
if (theme.BackgroundColor != null)
{
BackgroundColor = theme.BackgroundColor.Clone();
}
if (theme.BackgroundUri != null)
{
BackgroundUri = theme.BackgroundUri;
}
if (theme.BackgroundImage != null)
{
BackgroundImage = theme.BackgroundImage;
}
}
}