Skip to content

Binding to properties of other controls? #151

Closed Answered by brminnick
mrlacey asked this question in Q&A
Discussion options

You must be logged in to vote

Is binding to properties of other controls supported by any of the Bind extensions

Yup! That's known as a View-to-View binding.

Here's an example where I'm binding CollectionView.HeightRequestProperty to SearchBar.HeightProperty:

.Bind(CollectionView.HeightRequestProperty, SearchBar.HeightProperty.PropertyName, source: searchBar, convert: (double searchBarHeight) => this.Height - searchBarHeight)

https://github.com/ChilliCream/workshops/blob/e8c21a2c7b52ddd47ec641484272b42f825bb2f4/crypto-maui/frontend/X-final/Pages/ScreenerPage.cs#L26

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@mrlacey
Comment options

Answer selected by mrlacey
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants