Inheritance: System.Windows.Controls.TextBlock
Beispiel #1
0
        private static Inline BuildRef(ElementToken token, Hint hint)
        {
            string handler;

            token.Attributes.TryGetValue("handler", out handler);

            string hintStr;

            token.Attributes.TryGetValue("hint", out hintStr);
            if (hintStr != null)
            {
                hintStr = "<code>" + hintStr + "</code>";
            }
            var hc = new HintControl(hintStr, handler);

            Fill(hc.Inlines, token, hint);
            return(new InlineUIContainer {
                Child = hc
            });
        }
Beispiel #2
0
        private static Inline BuildSymbolHint(ElementToken token, Hint hint)
        {
            Trace.Assert(token.Name == "symbol");

            string handler;

            token.Attributes.TryGetValue("handler", out handler);

            string key       = token.Attributes["id"];
            string spanClass = token.Attributes["span-class"];

            string value = token.Text;

            var hc = new HintControl(key, hint.RaiseGetHintContent, handler);

            hc.Inlines.Add(new Run(value)
            {
                Foreground = hint.MapBrush(spanClass)
            });
            return(new InlineUIContainer {
                Child = hc
            });
        }
Beispiel #3
0
        private static Inline BuildSymbolHint(ElementToken token, Hint hint)
        {
            Trace.Assert(token.Name == "Symbol");

              string handler;
              token.Attributes.TryGetValue("handler", out handler);

              string key       = token.Attributes["id"];
              string spanClass = token.Attributes["SpanClass"];

              string value = token.Text;

              var hc = new HintControl(key, hint.RaiseGetHintContent, handler);
              hc.Inlines.Add(new Run(value) { Foreground = hint.MapBrush(spanClass) });
              return new InlineUIContainer { Child = hc };
        }
Beispiel #4
0
        private static Inline BuildRef(ElementToken token, Hint hint)
        {
            string handler;
              token.Attributes.TryGetValue("handler", out handler);

              string hintStr;
              token.Attributes.TryGetValue("hint", out hintStr);
              if (hintStr != null)
              {
            hintStr = "<code>" + hintStr + "</code>";
              }
              var hc = new HintControl(hintStr, handler);
              Fill(hc.Inlines, token, hint);
              return new InlineUIContainer { Child = hc };
        }