How to have “dark” icons (ex. ApplicationBar icons) in a folder with a black background so you can see them

Very often we have a set of icons to be used for ApplicationBar buttons or in an application page.
Very often we are interested in the “dark” version of each one and you would like to see all the icons in the folder with a black background (see first figure) so you can see it … but by default we have a view all white (see second figure) that is not very useful!
How can we do? Read more and you’ll find it’very easy …

I remind you that we are mainly interested in the “dark” icon version because the “light” version is authomatically provided by the ApplicationBar runtime and even if you use an icon in an application page you can avoid to have the “light” version if you define an appropriate style for the button that has an imageBrush with that icon. For example you can define in App.xaml a custom Button Style as follows:

 <!-- http://timdams.wordpress.com/2011/06/21/creating-a-wp7-app-supporting-dark-and-light-themes/
         or                   http://forums.create.msdn.com/forums/p/73878/450346.aspx
        usage:
        <Button Style="{StaticResource IconButton}" >
            <ImageBrush ImageSource="appbar.feature.search.rest.png" Stretch="None"/>
        </Button> -->

and then use it in your page in this way, reffering only to the “dark” version if the icon:

<Button Style="{StaticResource IconButton}"  Height="76" Width="76" Margin="0,25,0,0" Click="buttonSms_Click" >
    <ImageBrush ImageSource="/Resources/Images/Icons/Application/dark/sms.png" Stretch="Uniform" />
</Button>

So, coming back to the subject of this post, if you want to have a black background in the icon folder you onjly need to create (or modify) the hidden desktop.ini file inside that directory as follows, where you refer a jpg file in this case with a black pattern (if you like you can refer a picture … and you’ll have it as a background, but it is not what we want now!)

[AveFolder]
Recursive=1
TextR=255
TextG=255
TextB=255
IconArea_Image=C:\Users\Public\Pictures\Sample Pictures\Nero.jpg
ShadowedText=1

For your convenience, here you can download the little black pattern file I created that you have to put in C:\Users\Public\Pictures\Sample Pictures folder (right click on the following black picture -> Save image with name).

Annunci

Informazioni su Enzo Contini

Electronic engineer
Questa voce è stata pubblicata in Windows Phone/Mobile. Contrassegna il permalink.

Una risposta a How to have “dark” icons (ex. ApplicationBar icons) in a folder with a black background so you can see them

  1. Charity ha detto:

    This is really the third blog, of urs I personally checked
    out. But yet I personally enjoy this 1, “How to have dark icons (ex.
    ApplicationBar icons) in a folder with a black background so you can see them | Enzo Contini Blog” the best.
    Regards -Emile

Lascia un Commento/Leave a comment

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...