Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
if (Count == 0) return;
int buttonWidth = (int)root.Size.Width / Count;
- int buttonHeight = btStyle.Size.Height > itemheight ? (int)btStyle.Size.Height : (int)itemheight;
+ int buttonHeight = (int)Math.Max(btStyle?.Size?.Height ?? 0.0f, itemheight);
foreach (Button btnTemp in itemGroup)
{
btnTemp.Size = new Size(buttonWidth, buttonHeight);
}
}
- if (actionButtonStyle == null) actionButtonStyle = (ButtonStyle)appBarStyle.ActionButton.Clone();
+ if (actionButtonStyle == null) actionButtonStyle = (ButtonStyle)appBarStyle.ActionButton?.Clone();
else actionButtonStyle.MergeDirectly(appBarStyle.ActionButton);
- if (actionViewStyle == null) actionViewStyle = (ViewStyle)appBarStyle.ActionView.Clone();
+ if (actionViewStyle == null) actionViewStyle = (ViewStyle)appBarStyle.ActionView?.Clone();
else actionViewStyle.MergeDirectly(appBarStyle.ActionView);
itemTextLabel.MergeDirectly(pickerStyle.ItemTextLabel);
}
- itemHeight = (int)pickerStyle.ItemTextLabel.Size.Height;
+ itemHeight = (int)(pickerStyle.ItemTextLabel.Size?.Height ?? 0);
if (itemList != null)
foreach (TextLabel textLabel in itemList)