コード例 #1
0
 private void Font_Select(object sender, RoutedEventArgs e)
 {
     if (FontTypes.SelectedItem != null && EditableText != null)
     {
         EditableText.Selection.ApplyPropertyValue(System.Windows.Controls.RichTextBox.FontFamilyProperty, FontTypes.SelectedItem);
         EditableText.Focus();
     }
 }
コード例 #2
0
        private void EditableText_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if (EditableText.IsVisible)
            {
                EditableText.Focus();

                Keyboard.Focus(EditableText);

                EditableText.SelectAll();
            }
        }