Styles not working correctly inside of Rotator templates.

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)

  1. Start the app and swap to Page 2.
    Image_6487_1720619815290
  2. On Page 2 click "Change Inflation and Real Return values" button.
    Image_7432_1720619867527
  3. The buttons will load with the correct styles and you can swap between them and see the styles change.
    Image_2940_1720619915464

Testing in the Wizard: (Fail)

  1. Click "Get Started" to go to the wizard.
    Image_4026_1720619946666
  2. Go to Template 1 with the Dark Blue background. Click the button  "Change Inflation and Real Return values".
    Image_8456_1720619985651
  3. The buttons will load without the correct styles. You can compare these to the images above and to Page2. Image_9200_1720620050294
  4. You can see the buttons dont have the corner radius or the stroke color.


I have attatched the project as a zip file.

Can you please investigate and let me know if it is a bug or if there is a fix.

Thanks,
Mark

Attachment: MauiPrismSyncfusionTest_faa5bc21.zip

8 Replies

AA Aarthi Arjunan Syncfusion Team July 15, 2024 02:38 PM UTC

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.



HC Hariharan Chokkalingam Syncfusion Team July 26, 2024 03:56 PM UTC

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

How to clear NuGet cache?

 

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


Attachment: Reference_e42a0e0c.zip


MA Mark August 1, 2024 09:08 AM UTC

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.



AA Aarthi Arjunan Syncfusion Team August 2, 2024 02:53 PM UTC

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.


Attachment: Reference_4d7d597d.zip


AA Aarthi Arjunan Syncfusion Team August 5, 2024 02:22 PM UTC

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.



MA Mark August 6, 2024 08:44 AM UTC

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.



PR Preethi Rajakandham Syncfusion Team August 7, 2024 04:42 AM UTC

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



AA Aarthi Arjunan Syncfusion Team August 13, 2024 04:53 AM UTC

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.


Loader.
Up arrow icon