/// <summary> /// Set the font size /// </summary> protected override void InitializeResources(StyleSet classStyleSet) { base.InitializeResources(classStyleSet); FontSettings textSettings = new FontSettings(); classStyleSet.AddFont(FrequencyConstraintTextResource, DiagramFonts.CommentText, textSettings); }
/// <summary> /// Initialize a font for formatting the mandatory column contents. /// </summary> /// <param name="classStyleSet">The <see cref="StyleSet"/> being initialized.</param> protected override void InitializeResources(StyleSet classStyleSet) { base.InitializeResources(classStyleSet); FontSettings fontSettings = new FontSettings(); fontSettings.Bold = true; classStyleSet.AddFont(MandatoryFont, DiagramFonts.ShapeText, fontSettings); this.ListField.AlternateFontId = MandatoryFont; }
/// <summary> /// Initializes style set resources for this shape type /// </summary> /// <param name="classStyleSet">The style set for this shape class</param> protected override void InitializeResources(StyleSet classStyleSet) { base.InitializeResources(classStyleSet); // Custom font styles FontSettings fontSettings; fontSettings = new FontSettings(); fontSettings.Style = FontStyle.Bold; fontSettings.Size = 9 / 72.0F; classStyleSet.AddFont(new StyleSetResourceId(string.Empty, "ShapeTextBold9"), DiagramFonts.ShapeText, fontSettings); }
protected override void InitializeResources(StyleSet classStyleSet) { base.InitializeResources(classStyleSet); classStyleSet.AddBrush(m_brushId, m_brushId, new BrushSettings() { Color = Color.PapayaWhip }); FontSettings fontSettings = new FontSettings(); fontSettings.Style = System.Drawing.FontStyle.Bold; fontSettings.Size = 8 / 72.0F; classStyleSet.AddFont(m_FontId, DiagramFonts.ShapeText, fontSettings); // set text color for fields BrushSettings textBrush = new BrushSettings(); textBrush.Color = Color.FromKnownColor(KnownColor.Maroon); classStyleSet.OverrideBrush(DiagramBrushes.ShapeText, textBrush); classStyleSet.OverrideBrush(DiagramBrushes.ShapeTextSelected, textBrush); }
protected override void InitializeResources(StyleSet classStyleSet) { base.InitializeResources(classStyleSet); // Custom Font Settings. // Create a diagram shape text that has been bolded and underlined. var diagram = Diagram; Debug.Assert(diagram != null, "Unable to find instance of Diagram from CompartmentList instance."); if (diagram != null) { var fontSettings = diagram.StyleSet.GetOverriddenFontSettings(DiagramFonts.ShapeText); Debug.Assert(fontSettings != null, "Why Diagram doesn't contains FontSettings for ShapeText?"); if (fontSettings != null) { fontSettings.Bold = true; fontSettings.Underline = true; classStyleSet.AddFont( new StyleSetResourceId(string.Empty, "ShapeTextBoldUnderline"), DiagramFonts.ShapeText, fontSettings); } } }
/// <summary> /// Initializes style set resources for this shape type /// </summary> /// <param name="classStyleSet">The style set for this shape class</param> protected override void InitializeResources(StyleSet classStyleSet) { base.InitializeResources(classStyleSet); PenSettings settings = new PenSettings(); settings.Color = Color.FromArgb(0xff, 0, 0, 0); settings.Width = 0.01f; classStyleSet.OverridePen(DiagramPens.ShapeOutline, settings); BrushSettings settings2 = new BrushSettings(); settings2.Color = Color.FromArgb(0xff, 159, 183, 215); classStyleSet.OverrideBrush(DiagramBrushes.ShapeBackground, settings2); FontSettings settings3 = new FontSettings(); settings3.Style = FontStyle.Regular; settings3.Size = 0.09722222f; classStyleSet.AddFont(new StyleSetResourceId(string.Empty, "ShapeTextRegular7"), DiagramFonts.ShapeText, settings3); }
protected override void InitializeResources(StyleSet classStyleSet) { base.InitializeResources(classStyleSet); classStyleSet.AddBrush(m_headFootBrushId, m_headFootBrushId, new BrushSettings() { Color = Color.Azure }); FontSettings fontSettings = new FontSettings(); fontSettings.Style = System.Drawing.FontStyle.Bold; fontSettings.Size = 8 / 72.0F; classStyleSet.AddFont(m_FontId, DiagramFonts.ShapeText, fontSettings); // set text color for fields BrushSettings textBrush = new BrushSettings(); textBrush.Color = Color.FromKnownColor(KnownColor.Maroon); classStyleSet.OverrideBrush(DiagramBrushes.ShapeText, textBrush); classStyleSet.OverrideBrush(DiagramBrushes.ShapeTextSelected, textBrush); VDHTMLTagShape.AssociateValueWith(this.Store, VDHTMLTag.TagNameDomainPropertyId); VDHTMLTagShape.AssociateValueWith(this.Store, VDHTMLTag.TagTextDomainPropertyId); }