Esempio n. 1
0
 private void BeginEdit()
 {
     NameEditor.Text       = ViewModel.Name;
     NameBlock.Visibility  = Visibility.Collapsed;
     NameEditor.Visibility = Visibility.Visible;
     NameEditor.Focus();
 }
Esempio n. 2
0
        protected override Control AddEditor(Control container)
        {
            NameEditor ne = new NameEditor();

            ne.ID       = Name;
            ne.CssClass = "nameEditor";
            ne.WhitespaceReplacement = WhitespaceReplacement;
            ne.ToLower             = ToLower;
            ne.ShowKeepUpdated     = ShowKeepUpdated;
            ne.KeepUpdated.Text    = KeepUpdatedText;
            ne.KeepUpdated.ToolTip = KeepUpdatedToolTip;
            container.Controls.Add(ne);
            if (Focus)
            {
                ne.Focus();
            }
            return(ne);
        }
        protected override Control AddEditor(Control container)
        {
            NameEditor ne = new NameEditor();

            ne.ID       = Name;
            ne.CssClass = "nameEditor";
            ne.WhitespaceReplacement = WhitespaceReplacement;
            ne.ToLower                 = ToLower;
            ne.ShowKeepUpdated         = ShowKeepUpdated;
            ne.KeepUpdatedDefaultValue = KeepUpdatedDefaultValue;
            ne.KeepUpdated.Text        = KeepUpdatedText;
            ne.KeepUpdated.ToolTip     = KeepUpdatedToolTip;
            ne.Placeholder(GetLocalizedText("FromDatePlaceholder") ?? Placeholder);
            container.Controls.Add(ne);
            if (Focus)
            {
                ne.Focus();
            }
            return(ne);
        }
        protected override Control AddEditor(Control container)
        {
            var ne = new NameEditor
            {
                ID       = Name,
                CssClass = "nameEditor",
                WhitespaceReplacement = ' ',     // gets trimmed to ''
                ToLower         = false,
                ShowKeepUpdated = ShowKeepUpdated
            };

            ne.KeepUpdated.Text    = KeepUpdatedText;
            ne.KeepUpdated.ToolTip = KeepUpdatedToolTip;
            ne.Placeholder(GetLocalizedText("FromDatePlaceholder") ?? Placeholder);
            container.Controls.Add(ne);
            if (Focus)
            {
                ne.Focus();
            }
            return(ne);
        }