Exemplo n.º 1
0
        public void AddLabel(DbAttribute att, int gridRow, int gridColumn, bool isItalic = false, Grid parent = null)
        {
            Label element = new Label {
                Content = att.DisplayName, VerticalAlignment = VerticalAlignment.Center
            };

            ToolTipsBuilder.SetToolTip(att, element);

            if (isItalic)
            {
                element.FontStyle = FontStyles.Italic;
            }

            element.SetValue(Grid.RowProperty, gridRow);
            element.SetValue(Grid.ColumnProperty, gridColumn);
            _deployControls.Add(new Tuple <FrameworkElement, FrameworkElement>(element, parent));
        }
Exemplo n.º 2
0
        public void AddLabel(DbAttribute att, int gridRow, int gridColumn, bool isItalic = false, Grid parent = null)
        {
            Label element = new Label {
                Content = att.DisplayName, VerticalAlignment = VerticalAlignment.Center
            };

            ToolTipsBuilder.SetToolTip(att, element);

            AddLabelContextMenu(element, att);

            if (isItalic)
            {
                element.FontStyle = FontStyles.Italic;
            }

            element.SetValue(Grid.RowProperty, gridRow);
            element.SetValue(Grid.ColumnProperty, gridColumn);
            element.SetValue(TextBlock.ForegroundProperty, Application.Current.Resources["TextForeground"] as Brush);
            _deployControls.Add(new Utilities.Extension.Tuple <FrameworkElement, FrameworkElement>(element, parent));
        }