public PasswordEntryBackend() { Widget = new PasswordBox(); Adorner = new PlaceholderTextAdorner(PasswordBox); PasswordBox.Loaded += delegate { AdornerLayer.GetAdornerLayer(PasswordBox).Add(Adorner); }; PasswordBox.VerticalContentAlignment = VerticalAlignment.Center; }
public PasswordEntryBackend () { Widget = new PasswordBox (); Adorner = new PlaceholderTextAdorner (PasswordBox); PasswordBox.Loaded += delegate { AdornerLayer.GetAdornerLayer (PasswordBox).Add (Adorner); }; PasswordBox.VerticalContentAlignment = VerticalAlignment.Center; }
public TextEntryBackend() { Widget = new ExTextBox { IsReadOnlyCaretVisible = true }; Adorner = new PlaceholderTextAdorner (TextBox); TextBox.Loaded += delegate { AdornerLayer.GetAdornerLayer (TextBox).Add (Adorner); }; TextBox.VerticalContentAlignment = VerticalAlignment.Center; }
public MultiLineTextEntryBackend() { Widget = new ExTextBox { IsReadOnlyCaretVisible = true }; Adorner = new PlaceholderTextAdorner(TextBox); TextBox.Loaded += TextBox_Loaded; TextBox.VerticalContentAlignment = VerticalAlignment.Center; MultiLine = true; TextBox.TextWrapping = TextWrapping.Wrap; }
public TextEntryBackend() { Widget = new ExTextBox { IsReadOnlyCaretVisible = true }; TextBox.Loaded += delegate { Adorner = new PlaceholderTextAdorner (TextBox); var layer = AdornerLayer.GetAdornerLayer (TextBox); if (layer != null) layer.Add (Adorner); if (!String.IsNullOrEmpty(placeholderText)) Adorner.PlaceholderText = placeholderText; }; TextBox.VerticalContentAlignment = VerticalAlignment.Center; }
public TextEntryBackend() { Widget = new ExTextBox { IsReadOnlyCaretVisible = true }; Adorner = new PlaceholderTextAdorner(TextBox); TextBox.Loaded += delegate { var layer = AdornerLayer.GetAdornerLayer(TextBox); if (layer != null) { layer.Add(Adorner); } }; TextBox.VerticalContentAlignment = VerticalAlignment.Center; }
public TextEntryBackend() { Widget = new ExTextBox { IsReadOnlyCaretVisible = true }; TextBox.Loaded += delegate { Adorner = new PlaceholderTextAdorner (TextBox); var layer = AdornerLayer.GetAdornerLayer (TextBox); if (layer != null) layer.Add (Adorner); if (!String.IsNullOrEmpty(placeholderText)) Adorner.PlaceholderText = placeholderText; if(!TextBox.IsVisible) { Adorner.Visibility = Visibility.Hidden; } }; TextBox.IsVisibleChanged += TextBox_IsVisibleChanged; TextBox.VerticalContentAlignment = VerticalAlignment.Center; CommandManager.AddPreviewCanExecuteHandler(this.Widget as TextBox, new CanExecuteRoutedEventHandler(OnPreviewCanExecuteHandler)); }