public int GetFontSize(AdaptiveFontStyle fontStyle, AdaptiveTextSize requestedSize) { return(FontStyles.GetFontStyle(fontStyle).FontSizes.GetFontSize(requestedSize) ?? FontStyles.Default.FontSizes.GetFontSize(requestedSize) ?? FontSizes.GetFontSize(requestedSize) ?? FontSizesConfig.GetDefaultFontSize(requestedSize)); }
public AdaptiveTextBlock GetadaptiveTextBlock(string InputTxt, AdaptiveTextSize Size, AdaptiveTextColor Color, AdaptiveTextWeight Weight, AdaptiveHorizontalAlignment adaptiveHorizontalAlignment) { var TextBlock = GetadaptiveTextBlock(InputTxt, Size, Weight, adaptiveHorizontalAlignment); TextBlock.Color = Color; return(TextBlock); }
public AdaptiveTextBlock GetadaptiveTextBlock(string InputTxt, AdaptiveTextSize Size, AdaptiveTextWeight Weight, AdaptiveHorizontalAlignment adaptiveHorizontalAlignment) { var TextBlock = GetadaptiveTextBlock(InputTxt); TextBlock.Size = Size; TextBlock.Weight = Weight; TextBlock.HorizontalAlignment = adaptiveHorizontalAlignment; return(TextBlock); }
private static void AddTextBlock(AdaptiveColumn column, string text, AdaptiveTextSize size, bool isSubTitle = true) { column.Items.Add(new AdaptiveTextBlock() { Text = text, Size = size, HorizontalAlignment = AdaptiveHorizontalAlignment.Center, IsSubtle = isSubTitle, Separator = false }); }
// Create TextBlock public static List <AdaptiveElement> CreateTitle(string title, AdaptiveTextSize size = AdaptiveTextSize.Medium) { var content = new List <AdaptiveElement>(); if (!string.IsNullOrEmpty(title)) { content.Add(new AdaptiveTextBlock() { Size = size, Id = "Title", Wrap = true, Weight = AdaptiveTextWeight.Bolder, Text = title ?? string.Empty }); } return(content); }
protected static string ConvertSizeToClassName(AdaptiveTextSize textSize) { switch (textSize) { case AdaptiveTextSize.ExtraLarge: return("display-1"); case AdaptiveTextSize.Large: return("display-2"); case AdaptiveTextSize.Medium: return("display-3"); case AdaptiveTextSize.Small: return("small"); default: return(null); } }
public static int GetDefaultFontSize(AdaptiveTextSize fontSize) { switch (fontSize) { case AdaptiveTextSize.Small: return(12); case AdaptiveTextSize.Medium: return(17); case AdaptiveTextSize.Large: return(21); case AdaptiveTextSize.ExtraLarge: return(26); case AdaptiveTextSize.Default: default: return(14); } }
public int?GetFontSize(AdaptiveTextSize fontSize) { switch (fontSize) { case AdaptiveTextSize.Small: return(Small); case AdaptiveTextSize.Medium: return(Medium); case AdaptiveTextSize.Large: return(Large); case AdaptiveTextSize.ExtraLarge: return(ExtraLarge); case AdaptiveTextSize.Default: default: return(Default); } }
public static void AddTextBlockWithColumn(AdaptiveColumn column, string text, AdaptiveTextWeight TextWeight, AdaptiveTextSize size, AdaptiveTextColor TextColor, bool isSubTitle = true) { column.Items.Add(new AdaptiveTextBlock() { Text = text, Weight = TextWeight, Size = size, Color = TextColor, HorizontalAlignment = AdaptiveHorizontalAlignment.Center, IsSubtle = isSubTitle, Separation = AdaptiveSeparationStyle.None }); }
public static AdaptiveTextBlock AddTextBlock(string value, AdaptiveTextWeight TextWeight, AdaptiveTextSize TextSize, AdaptiveTextColor TextColor) { AdaptiveTextBlock newAdaptiveTextBlock = new AdaptiveTextBlock() { }; newAdaptiveTextBlock.Text = value; //newAdaptiveTextBlock.Text = "Sr. No"; newAdaptiveTextBlock.Weight = TextWeight; newAdaptiveTextBlock.Size = TextSize; newAdaptiveTextBlock.Color = TextColor; return(newAdaptiveTextBlock); }
private void SetColumnContent(AdaptiveColumn col, string storename, string productname, int number, decimal amount, AdaptiveTextSize size) { var Container = new AdaptiveContainer(); var Total = new AdaptiveTextBlock() { Text = $"{storename}-{productname} X {number} ${decimal.Round(amount)}", Size = size }; Container.Items.Add(Total); col.Items.Add(Container); }