StringFormat in wp7?

Is there a way to combine static text and anchor in one TextBlock? Since StringFormat does not work on a Windows 7 phone. I'm trying to

<TextBlock Text="{Binding strAudioArtistName, StringFormat=StaticText: {0}}"/> 

but do not work ....

thanks

+4
source share
2 answers

Actually, if you can change your viewing model and make formatting in the property, you will get much better performance than relying on IValueConverter.

I am using a template along these lines to still notify me of property changes

 string _value; public string Value { get { return _value; } set { _value = value; NotifyPropertyChanged("Value"); NotifyPropertyChanged("ValueFormatted"); } } public string ValueFormatted { get { return "Static Text: " + _value; } } 
+7
source

WP7 uses Silverlight 3 . So you are not getting StringFormat . Use IValueConverter .

+5
source

Source: https://habr.com/ru/post/1342534/


All Articles