wrapping text in TextBox editior

Editors for WPF Forum

Posted 10 years ago by dean
Avatar
I doing some bug fixes/feature requests for a client one of which included handling text wrapping for a text box.
Does the ActiproSoftware.Windows.Controls.Editors.TextBox class handle text wrapping?
If so what are the methods/properties to use?

Any help would be much appericated.

Comments (5)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Dean,

Sorry but our editors aren't designed to support word wrap at the moment.


Actipro Software Support

Posted 10 years ago by dean
Avatar
Thanks for that i know this is probably the wrong forum but

1) will the ribbon text box support word wrapping?
2) should ribbon controls be used outside the ribbon?
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Dean,

1) ribbon:TextBox does indirectly inherit the WPF TextBox, so I would think it would be supported but I haven't tried it since in the ribbon we focus on single line usage.

2) You can use them outside of the ribbon but they are generally designed to be command oriented for ribbon use. So things like buttons will work fine outside of the ribbon. The ribbon:TextBox isn't as beneficial outside the ribbon though. If you are specifically referring to the ribbon:TextBox, note we have a style for the native TextBox that makes it look like the ribbon one. That's demoed in the "Styles for Core WPF Controls" QuickStart.


Actipro Software Support

Posted 10 years ago by dean
Avatar
thank you very much your help and knowledge so far has been great.

I thought the editor and ribbon textbox inherit the WPF TextBoxBase class and that this class doesnot support word wrapping therefore neither control inherits word wrapping.

Could you please confirm if this is correct.
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Dean,

Editors has a custom text box class so it does not have word wrapping.

Ribbon's TextBox inherits the native WPF TextBox so it supports word wrap. This sort of code will use a native WPF TextBox with a ribbon theme to it and word wrap enabled:
<TextBox Style="{DynamicResource {x:Static ribbon:RibbonStyles.TextBoxKey}}" TextWrapping="Wrap" 
         Height="100" VerticalContentAlignment="Stretch" VerticalScrollBarVisibility="Visible" />


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 7 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.