Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit How to Customize Scrollviewer for TexBox Contorl
5 replies. Latest Post by HarshBardhan on September 3, 2008.
(0)
mr.saif
Member
417 points
147 Posts
09-03-2008 3:00 AM |
I have a textBox and want to customize its default scrollviewer. Is there any way to customize diefault scrollviewer that appears with the text box(vertically and horzontally), when its AcceptReturn Propery is set to true? TextBox Style template, http://msdn.microsoft.com/en-us/library/cc645061%28VS.95%29.aspx, provided by microsoft does not contain any property to set scrollviewer style. Is there any other style template for texbox control that include scrollviewer property?
HarshBar...
Star
9908 points
1,719 Posts
09-03-2008 3:33 AM |
I don't think for textbox or TextBlock even scrollViewer is coming even after specifying Horizontal and vertical scroll bar visibility......(If i am wrong correct me)...
That's why You are not able to get that in its Style Template..
09-03-2008 3:45 AM |
Scrollviewers(vertical and horizontal) are comming with TextBox control. please try the following simple XAML of TexBox control. and enter text in the textbox scrollviewer will be shown when text increase from the height, 80, and width, 200. <TextBox Canvas.Left="300" Canvas.Top="200" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Height="80" x:Name="tb123" AcceptsReturn="True" Width="200" />
Scrollviewers(vertical and horizontal) are comming with TextBox control. please try the following simple XAML of TexBox control. and enter text in the textbox scrollviewer will be shown when text increase from the height, 80, and width, 200.
<
I want to know the way to customize this scrollveiwer....
09-03-2008 4:13 AM |
Hi,
I have tried .
What i did in created a Templated For Scroll viewer and when i edited template of textBox then i applied Same Style template for Text box scroll viewer.
I am Pasting that code.
If you Are having any doubt feel free to ask..My design is not that much good so you Can modify this.
//Paste this in App.Xaml Resource Section...
///Paste this in Your Page.Xaml...
</
<Application.Resources>