Hi,
We have a Maui app that uses a SfRotator that loads the templates from xaml files.
Inside one of these templates we use Styles on a SfButton and they also change the Styles base on DataTriggers. The styles dont work as expected inside of the Rotator. This is only a problem on Windows and not Android.
I have created a sample app for you. In the sample app I have this code inside the Wizard and also in a Menu page. It works perfectly fine in the menu page.
Inside of the sample app you will find the code on Template1 and on Page2 from the flyout menu.
Testing in the Menu page: (Success)
Testing in the Wizard: (Fail)
Hi Mark,
Apologies for any inconvenience caused.
We have reviewed your query based on the provided information and have been able to reproduce the reported issue "Styles not working correctly inside of Rotator templates" at our end. The root cause of this issue is similar to the previous issue: "When using a grid with a binding for IsVisible inside of rotator templates, the Syncfusion controls don't load." We have logged a bug report for this. You can track the status of the bug through the feedback link provided below.
Link: Bug report 59484
We will share a patch for the reported issue on July 26, 2024. We appreciate your patience until then.
Note: The provided feedback link is private, and you need to log in to view this feedback.
If you have any more specifications or a scenario to be tested, you can add them as a comment in the portal.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
Regards,
Aarthi A.
Hi Mark,
We have addressed the reported issue "Styles not working correctly inside
of Rotator templates." Currently, we
have created a custom patch for version 26.2.5, and we have attached the NuGet
files for your convenience. Additionally, we have made some changes to your
sample. Specifically, we created an event in the Template1ViewModel and WizardViewModel
classes to call the SfRotator refresh method in Wizard.xaml.cs to refresh the
rotator item. Please refer to the attached custom package and updated sample
for your reference.
Please note that we have created this patch for
version 26.2.5 specifically to resolve the issue reported in this ticket. If
you have received other patches for the same version for other products, please
apply all patches in the order received.
Please clear the NuGet cache, before using the latest one and please refer to the below link for this
Please refer to the below KB to install the custom NuGet on a local machine,
How to install the MAUI custom NuGet in the Windows machine?
Note: Before installing the Rotator and other NuGet package, please install the provided custom patch after clearing the cache.
This fix will be included in our weekly release on August 06, 2024. We will notify you once NuGet is released and appreciate your understanding and patience until that time.
Disclaimer: The inclusion of this solution in the weekly release may change due to other factors, including but not limited to QA checks and work reprioritization.
Root cause and resolution:
Root Cause: The issue arises because the refresh method is not handled correctly in Windows in the rotator.
Resolution: We have resolved it by properly triggering the refresh method.
Regards,
Hariharan C
Hi,
We have provided a response to this in another thread. https://www.syncfusion.com/forums/189182/when-using-a-grid-with-a-binding-for-isvisible-inside-of-rotator-templates-then-the?reply=zm87m0
See link and below is a repeat.
Thank you for your response. I have tested your sample project Reference_e42a0e0c.zip with the supplied test Nuget package. This works.
Unfortunately this will not work for us as we are using the Prism MVVM model. Can you please provide us with a sample with the refresh code in the View model and not the code behind file?
I tested your sample with the refresh code removed and it unfortunately does not work. If we are to use the refresh code we will need a MVVM version.
Thanks
Mark.
Hi Mark,
Thank you for your feedback. We're glad the suggested solution worked for you. To access the Refresh method in the ViewModel, you can pass the Template1View page as a parameter to the button command. In the Template1ViewModel, you can then cast the parameter and access the SfRotator's Refresh method.
|
<button:SfButton Text="Change Inflation and Real Return values" Style="{StaticResource MediumButtonStyle}" Command="{Binding ChangeInflationAndGrowthCommand}" CommandParameter="{x:Reference Template1ViewXaml}" IsVisible="{Binding HideRiskViewDetailsButton, Converter={toolkit:InvertedBoolConverter}}"> </button:SfButton>
private void ExecuteChangeInflationAndGrowthCommand(object parameter) { HideRiskViewDetailsButton = true; (((parameter as StackLayout).Parent as ContentPresenter).Parent as SfRotator).Refresh(); } |
For your reference, we have updated the sample and provided a video for your convenience. Please let us know if this solution addresses your issue. If you have any further questions or concerns, don't hesitate to reach out to us.
Regards,
Aarthi A.
Hi Mark,
We were unable to include the fix for the issue "Styles not working correctly inside of Rotator templates" as promised in the weekly release scheduled to be published tomorrow (06 August 2024). This fix will be included in the next weekly release (13 August 2024).
If you would like to verify the fix before the next release, we can provide you with a custom patch. Please let us know if you are interested.
We apologize for any inconvenience this may have caused and appreciate your understanding.
Best regards,
Aarthi A.
Hi,
Thank you for your help with this. This is now resolved with your fix to pass in the page into the view model. I will add this to our app once the Nuget fix is officially released.
Thank you for your great support.
Mark.
Hi Mark,
You're welcome. Glad that the provided patch resolved the issue to pass in the page into the view model. As promised, the fix will be included in the next weekly release (13 August 2024).
Regards,
Preethi R
Hi Mark,
We have included the fix for the reported issue "Styles not working correctly inside of Rotator templates" in our latest weekly NuGet release v26.2.9 which is available for download (NuGet). We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you require any further assistance.
Regards,
Aarthi A.