dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.21k stars 1.74k forks source link

DataTrigger does not work on Mac Catalyst #23672

Closed xibeat closed 1 month ago

xibeat commented 3 months ago

Description

We are trying to use a data trigger that reacts to a value change and change the text decoration. Basic todo list that strikes out text when marked complete. Unfortunately, Maui is not capable to handle this small thing. Please suggest a workaround/fix for this. Our timelines are getting affected because of this. This issue is there since September 2023.

Screenshot 2024-07-18 at 12 57 18 PM

`<Label Style="{StaticResource LabelTextRegular16}" Text="{Binding Title}" TextDecorations="None" VerticalTextAlignment="Start">

                                            <Label.Triggers>
                                                <DataTrigger
                                                    Binding="{Binding IsCompleted}"
                                                    TargetType="Label"
                                                    Value="True">
                                                    <Setter Property="TextDecorations" Value="Strikethrough" />
                                                </DataTrigger>
                                            </Label.Triggers>
                                        </Label>`

PS: We were considering Maui for our flagship product and have bet lot of resources on this. However we have mostly spent times on finding workaround than actually delivering features. We might have to shift away completely from MAUI if this persists. Very sad.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.70 SR7

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms, Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

macOS

Affected platform versions

macOS Sonoma

Did you find any workaround?

No

Relevant log output

None
github-actions[bot] commented 3 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

xibeat commented 3 months ago

I am travelling and don't have access to a computer right now but here are the repro steps.

Repro Steps:

  1. Add a Collectionview
  2. Add a data template with Imagebutton and text
  3. Bind it to Text and IsComplete property of the model.
  4. Add a data trigger on Imagebutton to change image based on IsComplete property change.
  5. Add a data trigger on the Text to change decoration to Strike through based on IsComplete property change.
  6. Run the project on Mac.
  7. Change the IsComplete flag of the model with the help of command and notice. Image changes but the text strike through doesn't. Prasun Singha Roy

On Tue, 23 Jul 2024, 7:02 am dotnet-policy-service[bot], < @.***> wrote:

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

— Reply to this email directly, view it on GitHub https://github.com/dotnet/maui/issues/23672#issuecomment-2244011358, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFPJMTQP5XJTG5BQN4QNVLZNWMRPAVCNFSM6AAAAABLCDCHT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBUGAYTCMZVHA . You are receiving this because you were mentioned.Message ID: @.***>

xibeat commented 1 month ago

Hi Team. Any update on this?

QianaJiao commented 1 month ago

Hi @xibeat , would you mind share me a repo, I just create one with label and data trigger, it worked fine. Let's see if there is anything special in your code.

dotnet-policy-service[bot] commented 1 month ago

Hi @xibeat. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

dotnet-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.