❔ xamarin xaml binding
Is there a way to bind value of 2 varriables at once to one Label?
<Label Text="{Binding CheckIn, CheckOut, StringFormat='{0:MMM dd, yyyy} - {1:MMM dd, yyyy}'}"></Label>
Tried something like this i was hoping that i can make it format the label this way "{CheckIn:MMM dd, yyyy} - {CheckOut:MMM dd, yyyy}"
4 Replies
just create another variable that combines those 2
How do i make this?
Can't you use a MultiBinding? https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/data-binding/multibinding#format-strings
Xamarin.Forms Multi-Bindings - Xamarin
This article explains how to attach a collection of Binding objects to a single binding target property using the MultiBinding class.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.