maui-devexpress-dot-maui-dot-core-65ac7e1c.md
A container that shrinks vertically when you open a device keyboard to avoid content overlap. Also allows you to display custom content in the keyboard area.
Namespace : DevExpress.Maui.Core
Assembly : DevExpress.Maui.Core.dll
NuGet Package : DevExpress.Maui.Core
[ContentProperty("Content")]
[DXLicenseMAUI]
public class SafeKeyboardAreaView :
DXViewBase
Some controls display a DXToolbar component at the page’s bottom (for example, HtmlEdit). If you use such a control, put it inside a SafeKeyboardAreaView so that device keyboard and the toolbar don’t overlap. SafeKeyboardAreaView decreases the height of HTML Edit when you open the device keyboard and keeps the toolbar visible. After the keyboard is hidden (for example, when the HTML Edit control is no longer focused), HTML Edit once again occupies all available height.
<ContentPage ...
xmlns:dxhtml="clr-namespace:DevExpress.Maui.HtmlEditor;assembly=DevExpress.Maui.HtmlEditor"
xmlns:dx="clr-namespace:DevExpress.Maui.Core;assembly=DevExpress.Maui.Core">
<dx:SafeKeyboardAreaView>
<dxhtml:HtmlEdit>
<dxhtml:HtmlEdit.HtmlSource>
<dxhtml:UriHtmlEditSource Uri="index.html" />
</dxhtml:HtmlEdit.HtmlSource>
</dxhtml:HtmlEdit>
</dxhtml:SafeKeyboardAreaView>
</ContentPage>
The SafeKeyboardAreaView container also allows you to display custom content in the keyboard area to add more space for UI elements:
Follow the steps below to do it:
true to hide a keyboard and display the specified content.false to display a keyboard and hide the keyboard area content.<ContentPage ...
xmlns:dx="clr-namespace:DevExpress.Maui.Core;assembly=DevExpress.Maui.Core"
xmlns:dxc="clr-namespace:DevExpress.Maui.Controls;assembly=DevExpress.Maui.Controls">
<dx:SafeKeyboardAreaView x:Name="panel">
<dx:DXDockLayout StretchLastItem="False">
<dxc:DXToolbar x:Name="toolbar" dx:DXDockLayout.Dock="Bottom">
<dxc:ToolbarButton Icon="gotoimage" Content="Go To Page" Placement="FixedLeft" Clicked="OpenPanel"/>
</dxc:DXToolbar>
<dx:TextEdit/>
</dx:DXDockLayout>
<dx:SafeKeyboardAreaView.KeyboardAreaContent>
<dx:DXColorSelector/>
</dx:SafeKeyboardAreaView.KeyboardAreaContent>
</dx:SafeKeyboardAreaView>
</ContentPage>
void OpenPanel(Object sender, EventArgs e){
panel.IsOpened = !panel.IsOpened;
}
View Example: DevExpress .NET MAUI HTML Edit - Replicate a Built-In Toolbar
Show 14 items
Microsoft.Maui.Controls.ITabStopElement
Microsoft.Maui.IFrameworkElement
System.Object BindableObject Element NavigableElement VisualElement View DevExpress.Maui.Core.Internal.DXViewElement DevExpress.Maui.Core.Internal.DXViewBaseCore DXViewBase SafeKeyboardAreaView
YieldIfNotNull<SafeKeyboardAreaView>()
See Also