public override void ZoomFont(Control control, ZoomFontInfo infos) { C1TileControl tc = control as C1TileControl; if (tc != null) { if (tc.TextSize != 0f) { tc.TextSize *= infos.DeltaFactor; } if (tc.GroupTextSize != 0f) { tc.GroupTextSize *= infos.DeltaFactor; } else { tc.GroupFont = infos.Zoom(tc.GroupFont); } ZoomFont(tc.DefaultTemplate.Elements, infos); foreach (Template template in tc.Templates) { ZoomFont(template.Elements, infos); } } base.ZoomFont(control, infos); }
static void ZoomFont(ElementCollection elements, ZoomFontInfo infos) { for (int i = 0; i < elements.Count; i++) { var element = elements[i]; TextElement textElement = element as TextElement; if (textElement != null) { if (textElement.FontSize != 0f) { textElement.FontSize *= infos.DeltaFactor; } else { textElement.Font = infos.Zoom(textElement.Font); } } else { PanelElement panelElement = element as PanelElement; if (panelElement != null) { ZoomFont(panelElement.Children, infos); } } } }
public override void ZoomFont(Control control, ZoomFontInfo infos) { control.Font = infos.Zoom(control.Font); C1MainMenu menu = control as C1MainMenu; ZoomCommandLinksFont(infos, menu.CommandLinks); }
private void ZoomStyle(ZoomFontInfo infos, Style style) { if (style == null || style.Font == null) { return; } style.Font = infos.Zoom(style.Font); }
public override void ZoomFont(Control control, ZoomFontInfo infos) { base.ZoomFont(control, infos); C1NavBar navBar = control as C1NavBar; if (navBar.ButtonFont != null) { navBar.ButtonFont = infos.Zoom(navBar.ButtonFont); } if (navBar.PanelHeaderFont != null) { navBar.PanelHeaderFont = infos.Zoom(navBar.PanelHeaderFont); } if (navBar.SectionHeaderFont != null) { navBar.SectionHeaderFont = infos.Zoom(navBar.SectionHeaderFont); } }
private void ZoomAxis(ZoomFontInfo infos, Axis axis) { if (axis == null) { return; } if (axis.ShouldSerializeFont()) { axis.Font = infos.Zoom(axis.Font); } }
private void ZoomStyle(ZoomFontInfo infos, CellStyle style) { if (style == null || style.Font == null) { return; } Font newFont = infos.Zoom(style.Font); if (!object.ReferenceEquals(newFont, style.Font)) { style.Font = newFont; } }
private void ZoomCommandLinksFont(ZoomFontInfo infos, C1CommandLinks commandLinks) { foreach (C1CommandLink commandLink in commandLinks) { if (commandLink.Command is C1CommandMenu) { C1CommandMenu commandMenu = commandLink.Command as C1CommandMenu; if (!SystemInformation.MenuFont.Equals(commandMenu.Font)) { commandMenu.Font = infos.Zoom(commandMenu.Font); } ZoomCommandLinksFont(infos, commandMenu.CommandLinks); continue; } } }