Provide an option to export the DataForm control to a PDF document:
Ultimately the XAML we are using has the DataForm and a signature in png format at the bottom that is created from the view. We would want all of that in the PDF.
Data Form Editors expose the property EditorStyle to allow setting the input control's overall style. But some input control have multiple styles not so easily set.
As the input control is also the Editor's base content, instead exposing content as the appropriate type allows all of the input controls styles to be set.
Here is my working example in my KingdomContacts app for one editor:
namespace KingdomContacts.Controls;
using Telerik.Maui.Controls;
public class KcNumericDfEditor : DataFormRadNumericEditor
{
public RadNumericInput? Editor => base.Content as RadNumericInput;
}
I have made similar adaptations for all the other Data Form editors I use. Simple and easy to work with; far easier than guessing what to do with EditorStyle.
Would be even easier if a similar line were inside your editors -- then I would not need to make my own customizations.
provide an option to set ignore attribute in the model for ignoring certain properties from the business object, that should not be visible or editable.
I have used scaffold attribute, which does not work in the RadDataForm.
Expose additional properties for DataFormRadComboBox editor. Properties like DisplayMemberPath, SearchTextPath, etc.
Currently you can achieve this using the Editor Style
<telerik:DataFormRadComboBoxEditor EditorStyle="{StaticResource EditorStyle}"/>
<Style x:Key="EditorStyle" TargetType="telerik:RadComboBox">
<Setter Property="DisplayMemberPath" Value=""/>
</Style>
or create an editor that inherits from DataFomRadComboBoxEditor and define the DisplayMemberPath property.
When setting BorderThickness to 2 on the DataFormRadComboBoxEditor, an exception is thrown.
exception:
This exception was originally thrown at this call stack: WinRT.ExceptionHelpers.ThrowExceptionForHR.__Throw|20_0(int) Microsoft.Maui.Controls.Handlers.ShellItemHandler.MapTabBarIsVisible(Microsoft.Maui.Controls.Handlers.ShellItemHandler, Microsoft.Maui.Controls.ShellItem) Microsoft.Maui.PropertyMapper.UpdateProperties(Microsoft.Maui.IElementHandler, Microsoft.Maui.IElement) Microsoft.Maui.Controls.Handlers.ShellItemHandler.SetVirtualView(Microsoft.Maui.IElement) Microsoft.Maui.Controls.Platform.ShellView.CreateShellItemView() Microsoft.Maui.Controls.Platform.ShellView.SwitchShellItem(Microsoft.Maui.Controls.ShellItem, bool) Microsoft.Maui.Controls.Element.OnPropertyChanged(string) Microsoft.Maui.Controls.Shell.OnPropertyChanged(string) Microsoft.Maui.Controls.BindableObject.SetValueActual(Microsoft.Maui.Controls.BindableProperty, Microsoft.Maui.Controls.BindableObject.BindablePropertyContext, object, bool, Microsoft.Maui.Controls.Internals.SetValueFlags, bool) Microsoft.Maui.Controls.BindableObject.SetValueCore(Microsoft.Maui.Controls.BindableProperty, object, Microsoft.Maui.Controls.Internals.SetValueFlags, Microsoft.Maui.Controls.BindableObject.SetValuePrivateFlags) ... [Call Stack Truncated]
The masked editor throws an exception when used in DataForm on Windows. For example, consider the following sample code snippet:
<telerik:RadDataForm x:Name="dataForm">
<telerik:DataFormRadTextMaskedEditor HeaderText="Phone:"
Mask="000-000-0000"
PropertyName="Phone"/>
</telerik:RadDataForm>
When the Phone property has an initial value in the view-model, the following exception is thrown:
System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=Telerik.Maui.Core