Search code examples
windows-phone-8mvvmmvvmcross

MvvmCross - how to bind text to ApplicationBarMenuItem in WP8


I just wonder how to bind Text to my ApplicationBarMenuItem with MvvmCross.

<shell:ApplicationBarMenuItem Text="{Binding TextSource,Converter={StaticResource Language},ConverterParameter=LoginCaption, FallbackValue=LoginCaption,Mode=OneTime}"/>

Something like that will occur a message "Error: Text cannot be empty." So I have to make that programmatically, but how exactly?


Solution

  • The problem is not MVVMCross related, the problem is that the standard ApplicationBar is not bindable. I suggest you take a look at the BindableApplicationBar.