Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

XAML Label Text: Binding + DynamicResource (String Format?)

$
0
0

Hello,

is there a way to bind the Text Property (in XAML) of a Label to a Binding + DynamicResource? Maybe with string format?

for example I tried something like this:
<Label Text="{DynamicResource resource, Binding binding, StringFormat='Resource: {0} and Binding: {1}"} />
But one cannot declare a binding if a dynamic resource is set, same problem if trying it vice versa (eg. no dynamicresource if binding already set)

  • or with a value converter that returns the binding string to "binding string + dynamic resource"? (Creating a valueconverter for this seems too overwhelming)
  • in code this might work with string.Format(...)

Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>