Skip Navigation

πŸ’‘πš‚π—†π–Ίπ—‹π—π—†π–Ίπ—‡ π™°π—‰π—‰π—ŒπŸ“±
πŸ’‘πš‚π—†π–Ίπ—‹π—π—†π–Ίπ—‡ π™°π—‰π—‰π—ŒπŸ“± @ SmartmanApps @programming.dev
Posts
22
Comments
591
Joined
2 yr. ago

  • The disagreement was actually all over whether the question was about a switch or a button, and so some people were answering as though it was a switch, and some people were answering as though it was a button - switches and buttons do indeed have opposite approaches usually (a switch usually shows the current state - such as "on" - but a button shows what action will be triggered by pressing it, such as "play").

  • In dark mode you press it to go light mode, and in light mode you press it to go dark mode, but yeah, strictly speaking should've used a button rather than a switch for that usage.

  • Yeah, the wording isn't clear, and some people are talking about switches and some people are talking about buttons. I work with MAUI, and in MAUI a "ToggleButton" is called a Switch, so there's no confusion there, but the OP specifically said a button which toggles. i.e. a button which has 2 states instead of just one. A play button which turns into a pause button when you press it and vice-versa. I think the OP may have been confused between switches and buttons themselves - which are indeed labelled in opposite ways to each other (switch - current state, button - state that it will cause to happen when pressed) - which led to the question.

  • Again you're talking about switches. The thread is about normal buttons which have 2 states (the example being given is a button which can be a play button or a pause button depending on the current state). Buttons aren't like check-boxes, switches are. A button triggers an event, check-boxes don't. e.g. on a settings page, you tick all the check-boxes you want first, then click on the Save (or Cancel) changes button - one event for multiple changes. You don't tick a check-box to start playing something, you press a play button (which in this case would then change into a pause button).

  • I can’t think of any example of a button or switch that by itself can be clear if it is engaged or not

    The power button on my PC lights up when it is on. I have a start/cancel processing button with which I use different colour-schemes - it's a blue or green button/text for "start processing" and a red button/text for "cancel processing" (i.e. danger - this has consequences if you press it!).

  • This would be correct if the post was about switches (which TBF many people made that mistake, including me initially), but it's about buttons - buttons should show what action will result from clicking on them. e.g. "Cancel" on a button which is going to cancel your process. For a play/pause button it should show play if you're paused (if I click on this it will start playing) and pause if you're playing (if I click on this it will pause).

  • Not if the globe has blown out, in which case you need the switch to indicate which state it is in (unless you like to live dangerously and change globes in lights that may be still on :-) ).

  • Yeah, I just want to echo the growth over time comment. It's still (relatively) early days of the Fediverse and Lemmy, and we're still on the shallow part of the exponential growth graph. I mod the MAUI Community, which was created shortly before Xmas, and I made some announcements then (like on Mastodon, Daily Dew Drop, etc.) and some people joined then. But then I've also mentioned it again on a few other occasions since when it seemed appropriate (like the other day when I saw a notable dev still posting on Reddit), and each time I do it gains another subscriber or two. We just need to keep advocating each time there's an opportunity. We've built it, and now we just need to wait for them to come. :-) And it's been worthwhile, because when I have an issue I always post both here and on Mastodon, and sometimes I get a solution from Mastodon, but another time I got my solution from someone here (i.e. no-one from Mastodon responded, but someone here did, and the solution worked!). And of course, like Reddit, solutions posted here are easier to find than those posted on Mastodon. I think it's great and just needs some time to grow (as people learn how the Fediverse works and what all the available services are, such as Lemmy instead of Reddit).

  • Ah ok. Hopefully there'll be another update soon then that might fix it (a programmer's most feared words - "update available" ;-) ). Thanks! And also thanks for confirming not just dotnet.social that this is happenning on.

  • I'm not sure what you mean about embedding a browser - do you mean writing your UI in XAML? If so I wrote a whole blog post suitable for beginners and up on how to write a MAUI UI using only C# Creating MAUI UI's in C#