/// <summary>
        /// Creates the frame label.
        /// </summary>
        protected virtual TextField CreateDiagramTitleField()
        {
            var field = DiagramTitleField.CreateDiagramTitleField(DiagramTitleShapeName);

            field.DefaultText = Properties.Resources.DiagramTitleFieldText_VariabilityView;

            return(field);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates and returns a new configured instance of this shape.
        /// </summary>
        public static DiagramTitleField CreateDiagramTitleField(string fieldName)
        {
            DiagramTitleField textField = new DiagramTitleField(fieldName);
            textField.DefaultText = string.Empty;
            textField.DefaultVisibility = true;
            textField.DefaultAutoSize = true;
            textField.DefaultFontId = DiagramFonts.ShapeTitle;
            textField.DefaultFocusable = true;
            textField.AnchoringBehavior.MinimumHeightInLines = 1;
            textField.AnchoringBehavior.MinimumWidthInCharacters = 1;
            textField.DefaultAccessibleState = System.Windows.Forms.AccessibleStates.Invisible;

            return textField;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates and returns a new configured instance of this shape.
        /// </summary>
        public static DiagramTitleField CreateDiagramTitleField(string fieldName)
        {
            DiagramTitleField textField = new DiagramTitleField(fieldName);

            textField.DefaultText       = string.Empty;
            textField.DefaultVisibility = true;
            textField.DefaultAutoSize   = true;
            textField.DefaultFontId     = DiagramFonts.ShapeTitle;
            textField.DefaultFocusable  = true;
            textField.AnchoringBehavior.MinimumHeightInLines     = 1;
            textField.AnchoringBehavior.MinimumWidthInCharacters = 1;
            textField.DefaultAccessibleState = System.Windows.Forms.AccessibleStates.Invisible;

            return(textField);
        }
        /// <summary>
        /// Initializes the Resources for the background.
        /// </summary>
        private void InitializeBackgroundResources(StyleSet styleSet)
        {
            ITailoredBackgroundStyles styles = this.GetBackgroundStyles();

            Color gradientStartColor     = styles.TitleGradientFillColor;
            Color gradientEndColor       = Color.Transparent;
            Color selectedColor          = gradientStartColor;
            Color selectedInnactiveColor = gradientStartColor;

            // Title Text
            DiagramTitleField.InitializeInstanceResources(styleSet, TitleFontSize, styles.TitleTextColor);

            // Background color
            BrushSettings backgroundBrush = new BrushSettings();

            backgroundBrush.Color = styles.BackgroundFillColor;
            styleSet.OverrideBrush(DiagramBrushes.DiagramBackground, backgroundBrush);

            // Start of title gradient
            BrushSettings titleGradientBrush = new BrushSettings();

            titleGradientBrush.Color = gradientStartColor;
            styleSet.OverrideBrush(DiagramBrushes.ShapeBackground, titleGradientBrush);

            // Selected state
            titleGradientBrush       = new BrushSettings();
            titleGradientBrush.Color = selectedColor;
            styleSet.OverrideBrush(DiagramBrushes.ShapeBackgroundSelected, titleGradientBrush);

            // SelectedInactive state
            titleGradientBrush       = new BrushSettings();
            titleGradientBrush.Color = selectedInnactiveColor;
            styleSet.OverrideBrush(DiagramBrushes.ShapeBackgroundSelectedInactive, titleGradientBrush);

            // Find the field for the background
            AreaField background = this.FindShapeField(DiagramBackgroundShapeName) as AreaField;

            if (background != null)
            {
                background.DefaultReflectParentSelectedState = true;
                background.GradientEndingColor = gradientEndColor;

                // Constrain the height of the shape
                background.AnchoringBehavior.SetBottomAnchor(AnchoringBehavior.Edge.Bottom, (this.MaximumSize.Height - GradientHeight));
            }
        }