internal static string ToHex(this TColor c) { if (c.IsDefault) { TLog.Warn("Trying to convert the default color to hexagonal notation, it does not works as expected."); } return(string.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", c.R, c.G, c.B, c.A)); }
public static Toolbar SetTVTabBarWithTitleStyle(this Toolbar toolbar) { if (!DeviceInfo.IsTV) { TLog.Error($"ToWatchPopupRightStyleButton is only supported on TV profile : {0}", DeviceInfo.GetDeviceType()); return(toolbar); } toolbar.Style = ThemeConstants.Toolbar.Styles.TV.TabbarWithTitle; return(toolbar); }
public static Popup SetWatchCircleStyle(this Popup popup) { if (!DeviceInfo.IsWatch) { TLog.Error($"ToWatchPopupRightStyleButton is only supported on wearable profile : {0}", DeviceInfo.GetDeviceType()); return(popup); } popup.Style = ThemeConstants.Popup.Styles.Watch.Circle; return(popup); }
public static Button SetWatchTextStyle(this Button button) { if (!DeviceInfo.IsWatch) { TLog.Error($"ToWatchPopupRightStyleButton is only supported on wearable profile : {0}", DeviceInfo.GetDeviceType()); return(button); } button.Style = ThemeConstants.Button.Styles.Watch.Text; return(button); }
public static ESize GetPlaceHolderTextBlockFormattedSize(this EEntry entry) { var textPart = entry.EdjeObject[ThemeConstants.Entry.Parts.PlaceHolderText]; if (textPart == null) { TLog.Error("There is no elm.guide part"); return(new ESize(0, 0)); } return(textPart.TextBlockFormattedSize); }
public static ESize GetTextBlockNativeSize(this EEntry entry) { var textPart = entry.EdjeObject[ThemeConstants.Common.Parts.Text]; if (textPart == null) { TLog.Error("There is no elm.text part"); return(new ESize(0, 0)); } return(textPart.TextBlockNativeSize); }
public static ESize GetTextBlockFormattedSize(this ELabel label) { var textPart = label.EdjeObject[ThemeConstants.Common.Parts.Text]; if (textPart == null) { TLog.Error("There is no elm.text part"); return(new ESize(0, 0)); } return(textPart.TextBlockFormattedSize); }