Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting Loading #242

Closed
wants to merge 4 commits into from
Closed

Porting Loading #242

wants to merge 4 commits into from

Conversation

niels9001
Copy link
Collaborator

@niels9001 niels9001 commented Sep 23, 2023

This PR ports over the Loading control.

Loading

Tested on UWP, WASDK

@Arlodotexe Sample doesn't do anything on WASM.. but not getting any errors either, do you see what's going on?

Closes: #92


<Grid>
<controls:Loading IsLoading="{x:Bind LoadingState, Mode=OneWay}">
<controls:Loading.Content>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extra layer here shouldn't be needed, Content should be set by default.

mc:Ignorable="d">

<Grid>
<controls:Loading IsLoading="{x:Bind LoadingState, Mode=OneWay}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe as another sample we can combine with the MVVM Toolkit and the Converter Task helper we have for the TaskResultConverter so that the loading command/task thing auto sets the thing to true? (Just have a dummy delay for like 5 seconds?)

@michael-hawker
Copy link
Member

@niels9001 actually was just thinking, is there anything the Loading control really provides over SwitchPresenter?

We could adapt the MVVM Toolkit sample: https://github.com/CommunityToolkit/MVVM-Samples/blob/master/samples/MvvmSampleUwp/Views/AsyncRelayCommandPage.xaml

And show another sample with SwitchPresenter bound to the Task Status with three states:

  1. Loading (Task Status Running)
  2. Completed Successfully (Image or whatever)
  3. Error/Failure state

Seems like would be more useful maybe?

Would need to have maybe buttons/commands in the sample to simulate the operations to showcase each state? @Arlodotexe we're still missing those in the sample source generator, eh?

@tinodo
Copy link

tinodo commented Nov 20, 2023

I'd love to see this request complete. Not having the Loading control currently is blocking my upgrade. I will take a look at the SwitchPresenter, but the Loading control was so easy to use....

@niels9001
Copy link
Collaborator Author

We'e discussed this with the Toolkit team, and decided to not go through with this port in favor of #285

@niels9001 niels9001 closed this Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Port Loading
3 participants