-
Is binding to properties of other controls supported by any of the Ultimately I also want to be able to create instances of controls where some properties (& commands) are bound to a ViewModel (via the BindingContext) and some properties are bound to properties of other controls on the page. I've been experimenting with a lot of different things that I thought should/might work but with no success. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yup! That's known as a View-to-View binding. Here's an example where I'm binding .Bind(CollectionView.HeightRequestProperty, SearchBar.HeightProperty.PropertyName, source: searchBar, convert: (double searchBarHeight) => this.Height - searchBarHeight) |
Beta Was this translation helpful? Give feedback.
-
Closed and answered |
Beta Was this translation helpful? Give feedback.
Yup! That's known as a View-to-View binding.
Here's an example where I'm binding
CollectionView.HeightRequestProperty
toSearchBar.HeightProperty
:https://github.com/ChilliCream/workshops/blob/e8c21a2c7b52ddd47ec641484272b42f825bb2f4/crypto-maui/frontend/X-final/Pages/ScreenerPage.cs#L26