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

SI Units Filtering #809

Closed
ThomasVetterling opened this issue Jun 10, 2020 · 2 comments
Closed

SI Units Filtering #809

ThomasVetterling opened this issue Jun 10, 2020 · 2 comments
Labels

Comments

@ThomasVetterling
Copy link

Hello dear Units.Net team,

probably if have a stupid question:

How can I filter the possible Units to only the ones which are SI-Units and derived from SI?
I dont want to show the imperial Units to my users in UI.

Is there a flag for filtering imperial units out of any quantityInfo.UnitInfos ?

Thank you for any hint you can give me.

Yours Thomas Vetterling

@lipchev
Copy link
Collaborator

lipchev commented Jun 10, 2020

Hello Thomas,
Unfortunately this is something that is currently missing from the library- I have started #709 that would address this issue- but haven't had the time to work on it.
As of right now- my advice to you would be to create lists (I have those defined as xaml resources i.e. x:Arrays) that you populate yourself. If we're talking about user selection- honestly- I think even if you filtered out the non-SI units- most of the time, you'd still be left with way too many units.

If you don't care about UX but only need to get the list- I have a quick-and-dirty extension somewhere that filters out on the units that are powers of 10.

@stale
Copy link

stale bot commented Aug 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 9, 2020
@stale stale bot closed this as completed Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants