Trying to create buttons with dynamic sizes. (Visualizing the monitor setup on your computer) #17652
-
Beta Was this translation helpful? Give feedback.
Answered by
thevortexcloud
Dec 1, 2024
Replies: 1 comment 4 replies
-
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. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
devedse
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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