Example #1
0
        private static void IsNinchedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            StringEditor editor = d as StringEditor;

            if (editor != null)
            {
                editor.UpdateTextFromValue();
            }
        }
Example #2
0
        private static void IsEditingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            StringEditor editor = d as StringEditor;

            if (editor != null)
            {
                bool isNowEditing = (bool)e.NewValue;
                if (isNowEditing)
                {
                    if (editor.IsInitialized)
                    {
                        editor.Focus();
                    }
                    else
                    {
                        editor.PostFocusCallback();
                    }
                }
            }
        }