This project is read-only.
TextBox (Multi-Line) Example

multitext.jpg

If screen real estate is not an issue, and so you just need a regular textbox with multi-line text and a scrollbar, you may use the regular WPF TextBox initialized for ScrollViewer support (to allow accessing the Scrollbar which may then have its colors modified by the ApplyToScrollViewer method.)

See Extended WPF Toolkit™ Community Edition MultiLineTextEditor if screen real estate is an issue.

Example:
#region Setup Multi-Line TextBox with styled ScrollViewer

TextBox trex = new TextBox(); 
trex.InitializeForScrollViewerSupport(100D, 150D, 140D);  //TextBox is NOT an IParent but it is an IScrollViewerStrategy.
ScrollViewerStyle.ApplyToScrollViewer<TextBox>(trex, "PowderBlue", "White", "Blue");
trex.Text = "This is an example\n of a\n multi-line textbox with enough text in it to trigger the vertical scrollbar to display.";

#endregion

Last edited May 26, 2014 at 5:58 AM by stagathome0069, version 3

Comments

No comments yet.