Ejemplo n.º 1
0
        public void SetFormattedText(FormattedText text)
        {
            var formattedLabel = new System.Windows.Controls.TextBlock();

            formattedLabel.ApplyFormattedText(text, null);

            this.menuItem.Header = formattedLabel;
        }
Ejemplo n.º 2
0
        public void SetFormattedText(FormattedText text)
        {
            SWC.Label labelCtrl = null;
            if (Button.Content is SWC.DockPanel)
            {
                var grid = Button.Content as SWC.DockPanel;
                labelCtrl = grid.Children[1] as SWC.Label;
            }
            else
            {
                labelCtrl      = new SWC.Label();
                Button.Content = labelCtrl;
            }
            var textCtrl = new SWC.TextBlock();

            textCtrl.ApplyFormattedText(text, null);
            labelCtrl.Content = textCtrl;
        }