Exemple #1
0
        private static Inline BuildHint(ElementToken token, Hint hint)
        {
            Trace.Assert(token.Name == "hint");

            string handler;

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

            string key;

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

            string value = token.Attributes["value"];

            var hc = key == null ? new HintControl(token.ToString(), handler)
                           : new HintControl(key, hint.RaiseGetHintContent, handler);

            //Fill(hc.Inlines, token);
            hc.Inlines.Add(new Run(value));
            return(new InlineUIContainer {
                Child = hc
            });
        }