Email: Password:       Forgot Password 
    .netCodeSG
A Saarsha Group Online Community for dot net codes group like C#, Asp.NET, VB.NET, Sharepoint, JavaScript, JQuery, Ajax, SQL, WCF, WPF.
 
TECHNOLOGIES:
 

Wrapping and Scrolling TexBox in WPF

Article:
Viewed:  1195 
Posted On:  23/09/2012 05:42:30 
Learn how to use textbox property Wrapping and Scrolling in WPF. 

In this article I am going to explain how we can use Wrapping and Scrolling property of textbox in WPF.

Below is my XAML code:

<Window x:Class="WrappingAndScrollingTextBox_WPF.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300">
    <Grid>
        <TextBox Height="33" HorizontalAlignment="Left" Margin="50,68,0,0" Name="myTxt"
                 VerticalAlignment="Top" Width="200" Text="Hi Welcome to WPF! very exciting to work here in WPF Application."
                 TextWrapping="Wrap" Background="Black" Foreground="White" 
                 HorizontalContentAlignment="Center"
                 HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Visible" />
    </Grid>
</Window> 

When I run application: 

Wrapping1.png 

Figure 1. 

Wrapping2.png 

Figure 2.

  Comment:
         HOME   |   Submit Article   |   Contact Us   |   About Us   |   Terms & Condition   |   Advertise With us