Esempio n. 1
0
        public void Text(string text, string id = null)
        {
            if (id == null)
            {
                id = text;
            }
            var elmt = ProcureElement(
                id ?? text,
                id1 => ElmtMakerTuple.WithNoEvtHandling(new WpfCtrls.TextBlock()
            {
                Uid = id
            }));

            ((WpfCtrls.TextBlock)elmt.WpfElement).Text = text;
        }
Esempio n. 2
0
        public ImElement ProcureElement(string id, imFormsElmtMaker maker)
        {
            ImElement elmt;

            if (!ImElements.TryGetValue(id, out elmt))
            {
                ElmtMakerTuple t = maker(id);
                elmt = new ImElement(t.WpfElement, t.Handler);
                ImElements.Add(id, elmt);
            }

            elmt.ImState = ImElement.State.Drawn;
            elmt.SortKey = CurrentSortKey;
            elmt.WpfElement.Visibility = Wpf.Visibility.Visible;
            CurrentSortKey++;
            return(elmt);
        }