Skip to content

Trying to create buttons with dynamic sizes. (Visualizing the monitor setup on your computer) #17652

Answered by thevortexcloud
devedse asked this question in Q&A
Discussion options

You must be logged in to vote

There is an example for binding to a canvas in the docs in a list control.

https://docs.avaloniaui.net/docs/concepts/custom-itemspanel

Although that example is technically a violation of MVVM as it gives the view model some direct coupling to the view.

Why your one is not working, I am not sure though. Does it display anything if you hard code a value in your view?

Also Avalonia already has an API for querying screen info.

#15901

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@devedse
Comment options

@devedse
Comment options

@thevortexcloud
Comment options

@devedse
Comment options

Answer selected by devedse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants