- MaximumHeightRequest and MinimumHeightRequest
- Limitations in AutoSize
Contact Support
AutoSize in Xamarin Rich Text Editor (SfRichTextEditor)
21 Jan 20251 minute to read
The Xamarin Rich Text Editor control provides support to dynamically change the height of the control based on the input text’s height. This feature can be enabled by setting the AutoSizeOption.TextChanges
to AutoSize
property. By default, AutoSize feature will be disabled in RichTextEditor. The following code example shows how to enable AutoSize in Rich Text Editor control.
<richtexteditor:SfRichTextEditor AutoSize="TextChanges" />
richtexteditor = new SfRichTextEditor()
{
AutoSize = AutoSizeOption.TextChanges
};
this.Content = richtexteditor;
MaximumHeightRequest and MinimumHeightRequest
AutoSize feature in the Xamarin Rich Text Editor control can be controlled by setting the MaximumHeightRequest
and MinimumHeightRequest
properties. The following code example shows how to set the MaximumHeightRequest and MinimumHeightRequest for RichTextEditor control.
<richtexteditor:SfRichTextEditor AutoSize="TextChanges" MaximumHeightRequest="500" MinimumHeightRequest="250" />
richtexteditor = new SfRichTextEditor()
{
AutoSize = AutoSizeOption.TextChanges,
MaximumHeightRequest = 500,
MinimumHeightRequest = 250
};
this.Content = richtexteditor;
NOTE
AutoSize will not be working when the application is in
AdjustResize
SoftInputMode.
Limitations in AutoSize
- AutoFocus will not be working in the Xamarin RichTextEditor iOS.
- Extra spaces will be added in the bottom of the RichTextEditor control in iOS platform.
- Focus and UnFocus events will not triggered programmatically until the RichTextEditor is manually focused in the Xamarin RichTextEditor iOS.
- Custom toolbar will not working in the Xamarin RichTextEditor iOS because the control selection will be lost when clicking the elements in the custom toolbar.
- RichTextEditor will not rendered in the XAML Previewer for RichTextEditor(all platforms).
- Toolbar will be hidden when the
MaximumHeightRequest
is beyond the keyboard region.