locked
AppBar buttons RRS feed

  • Question

  • I have some really cool 3d blue orb buttons that I am using for my WPh7 app and in the Dark Scheme the look really cool. But when you switch the device to Light scheme, they get rendered as all black buttons with no icon rendered in the middle of them, is there some coding I can to so that the same blueorbs get rendered the same way for the Light Scheme so they are still blue?

    Thanks Jon
    Tuesday, January 17, 2012 2:09 PM

All replies

  • please refer to following thread on forums.

    Vish
    Tuesday, January 17, 2012 2:38 PM
  • Thanks for that thread,  but I guess I am still confused, I am not sure why I can't just make it display the same blueOrb Icon as blue not a black dot? That post said you need to provide light and dark images, but what if I just want the same image used exactly the same for light ae it was for dark? The blueorb glossy icon will be just as visible in light or dark.
    After playing around a little more I found that the button is in its blueOrb state when you tap it. when it is not tapped it is just a black dot. How can I make it display in the tapped state all the time when phone is set to Light scheme?

    Sorry I dont understand :)
    Thanks Jon
    I tried this paying around but it is still just a black dot in the light scheme
     public MainPage()  
            {  
                InitializeComponent();  
                //Service1Client proxy = new Service1Client();  
               // proxy.DLNewClientsCompleted += new EventHandler<DLNewClientsCompletedEventArgs>(proxy_DLNewClientsCompleted);  
                DisplayState();  
            }  
     
            private void DisplayState()  
            {  
                SolidColorBrush backgroundBrush = Application.Current.Resources["PhoneBackgroundBrush"as SolidColorBrush;  
     
                if (backgroundBrush.Color == lightThemeBackground)  
                {  
                    // you are in the light theme   
                    IApplicationBarIconButton syncButton = new ApplicationBarIconButton();  
                    syncButton.IconUri = new Uri("/icons/glossyBlueSync.png", UriKind.Relative);  
                    ApplicationBar = new ApplicationBar();  
                    syncButton.Text = "Sync";  
                    ApplicationBar.Buttons.Add(syncButton);  
                }  
                else 
                {  
                    // you are in the dark theme   
                }  
            }   
     


    Tuesday, January 17, 2012 3:07 PM
  • I've tried to use color AppBar icons in the past, and ran into the same issues you did. Somewhere in the documentation (can't find it right now), it says only black and white icons are supported. As you've found, in dark theme the system displays the icon you give it, colors and all. In light theme, the icon is generated by the system. It inverts the colors but assumes that the source is black and white. Non-black (e.g. color) pixels are handled as white and will be inverted to black. I think the best you'll be able to do is use a color icon for dark theme and switch to a black and white icon for light theme.


    Richard Woo
    Tuesday, January 17, 2012 5:13 PM
  • Thank You for that info Richard,
     I think that is what I will do, I have black and white icons that are ok..... so they will just have to be fine for the Light theme.

    Thanks Jon Stroh
    Wednesday, January 18, 2012 12:19 AM