Hello,
is there a way to customize a little bit more the Group Text. I'm already using the SfExpander and would like to style the groups in a similar way: i.g. Icon - on the right side, or left padding for the text (space between background color and text)
I'm already using the DataFormLayoutManager.
Thank you very much!
Kind regards,
Robert
Your requirement can be achieved by setting the padding for the group header with the help of GetLeftPaddingForGroupHeader override method in the DataFormLayoutManagerExt class. Please refer to the code snippet for your reference.
Code Snippet
public class DataFormLayoutManagerExt : DataFormLayoutManager { public DataFormLayoutManagerExt(SfDataForm dataForm) : base(dataForm) {
}
protected override int GetLeftPaddingForGroupHeader(DataFormGroupItem dataFormGroupItem) { return 150; } } |
Please refer to the demo sample in the following locations.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataFormXamarin352243226
Please let us know if you have any concerns.
Hi,
thank you very much for your answer.
I already tried it and and unfortunately it works like margin - not padding:
With padding I would expect it like that (photoshop)
Thank you,
kind regards,
Robert
Currently, we are checking the reported
scenario from our end. We will update you on further details on November 8,
2022. We appreciate the patience until then.
#Regarding Improvements to set the padding for the GroupHeader Text in the Dataform
We have logged the issue report for the same. We will fix the issue and include the issue fix in our Weekly nuget release which is expected to roll out on November 29, 2022. We appreciate your patience until then.
You can track the status of this report through the following feedback link,
Note:
The provided feedback link is private, you need to login to view this feedback.
Hi Robert,
Due to the testing phase, we could not include the fix in our weekly nuget release as promised. We will include it in our upcoming weekly nuget release which is expected to roll out in the month of December 6, 2022. We will let you once release rolled out and appreciate your patience until then.
Regards,
SaiGanesh Sakthivel
no problem, thank you for the information!
Hi Robert,
Thank you for the update. We will let you know once the release rolls out.
Regards,
SaiGanesh Sakthivel
Hi Robert,
#Regarding Improvements to set the padding for the GroupHeader Text in the Dataform
Your requirement can be achieved with the help of GenerateViewForGroupHeader override method. Inside the method, you can set the padding for the GroupHeader view. Please refer to the following code snippet for your reference.
Code snippet
public class DataFormLayoutManagerExt : DataFormLayoutManager { public DataFormLayoutManagerExt(SfDataForm dataForm) : base(dataForm) {
}
protected override View GenerateViewForGroupHeader(DataFormGroupItem dataFormGroupItem) { var label = base.GenerateViewForGroupHeader(dataFormGroupItem); (label as Label).Padding = new Thickness(20, 0, 0, 0); return label; } } |
We have faced the issue while setting the padding and fixed the issue from our end. Due to the testing phase, we have prepared patch including the fix. Before installing the patch, kindly remove bin and obj folders from all the projects of solution and clear NuGet cache.
Please refer our following KB document to clear nuget cache.
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache
Custom Assemblies: https://syncfusion.com/Installs/support/patch/20.3.0.56/1190712/F178570/SyncfusionPatch_20.3.0.56_1190712_12072022122433573_F178570.zip
Disclaimer:
Please note that we have created this patch for version 20.3.0.56 specifically to include the issue.
We will include the implemented feature in our upcoming 2022 Volume 4 release which is expected to roll out in Month of December, 2022. We appreciate your patience until then.
Regards,
SaiGanesh Sakthivel
Hi Robert,
#Regarding Improvements to set the padding for the GroupHeader Text in the Dataform
We are glad to announce that our Essential Studio 2022 Volume 4 Main Release V20.4.0.38 is rolled out and the reported issue fix is available for download under the following link.
Release note: https://help.syncfusion.com/xamarin/release-notes/v20.4.0.38?type=all#sfDataForm-bug-fixes
We thank you for your support and appreciate your
patience in waiting for this release. Please get in touch with us if you would
require any further assistance.
Regards,
SaiGanesh Sakthivel