1
Vote

App start fails if Binding is used for Text in SelectedPivotItemChangedTrigger

description

This fails:appBarUtils:AppBarButton IconUri="/Assets/appbar.settings.png" Text="{Binding Loc.AppBarSettings}" Command="{Binding ShowSettings}"but when changed the line to this, it works:appBarUtils:AppBarButton IconUri="/Assets/appbar.settings.png" Text="abcd" Command="{Binding ShowSettings}"fixed it myself by setting dummy text here: public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(AppBarItemBase), new PropertyMetadata("empty", TextPropertyChanged));and changing the constructor like this: public AppBarButton() { _applicationBarItem = new ApplicationBarIconButton(); ChangeText(); // also made it protected SubscribeClickEvent(); }

comments

Necroman wrote Nov 18, 2012 at 6:01 PM

edit, third update, it looks like pasting code directly from VS2012 causes entering only white symbols

Necroman wrote Nov 18, 2012 at 6:04 PM

fourth try, apparently I cannot use XAML code when submitting bugs

allenlooplee wrote Today at 2:00 PM

Hi there,

There's a sample using SelectedPivotItemChangedTrigger and setting Text of AppBarButton to a string rather than binding, see DynamicAppBarPivotPage.xaml. But it runs fine. So I think it doesn't repro here.