I have a ToggleButton in MainPage.xaml:
<ToggleButton x:Name="ColorToggle" Background="{Binding Background, ElementName=LayoutRoot}" ToolTipService.ToolTip="Change Toolbar Color">
...yet when I try to access it from MainPage.xaml.cs:
private void SaveAppBarColorSelected(object sender, TappedRoutedEventArgs e)
{
PhotraxUtils.SetLocalSetting(PhotraxConsts.APPBARBUTTON_COLOR, ColorToggle.Background.ToString());
}
...I get, "The name 'ColorToggle' does not exist in the current context"
Why is that?