I am stuck with the small issue…
I am using Silverlight.
I have a textbox with multiline property true.
and i want the facillity that when user press "ALT + Enter" then cursor should move to the next line.
I have already set the properties like AcceptsReturn, TextWrapping. But it is not working 🙁
Can anyone please shed some light on this?
Thanks,
Mahesh
Here is sample code:
Style x:Key="MultilineTextBoxCellStyle" TargetType="TextBox">
Setter Property="AcceptsReturn" Value="True"/>
Setter Property="TextWrapping" Value="Wrap"/>
Setter Property="Height" Value="100"/>
Setter Property="Page:MultilineTextboxScrollbar.MyVsbv" Value="Auto" />
I am giving this style to dynamic created textbox: Which is in grid view ….
dataColumn.EditorSettings = new TextBoxEditorSettings();
dataColumn.EditorSettings.CellEditStyle = (Style)this.Resources["MultilineTextBoxCellStyle"];
THanks,
Mahesh
Best Answer
Alt + Enter in a silverlight single line textbox actually makes IE 8 switch to fullscreen mode. Also, in my book allowing Silverlight applications to override browser shortcuts would be a serious security issue...
Here's a related question: Override (IE7) browser keyboard handling from Silverlight