StringPropertyEditor.cs 518 B

12345678910111213141516171819
  1. using System.Windows;
  2. namespace HandyControl.Controls
  3. {
  4. public class PlainTextPropertyEditor : PropertyEditorBase
  5. {
  6. public override FrameworkElement CreateElement(PropertyItem propertyItem)
  7. {
  8. var textbox = new System.Windows.Controls.TextBox
  9. {
  10. IsReadOnly = propertyItem.IsReadOnly
  11. };
  12. textbox.SetBinding(System.Windows.Controls.TextBox.TextProperty, CreateBinding(propertyItem));
  13. return textbox;
  14. }
  15. }
  16. }