Yesterday Microsoft automatically updated the Ajax Virtual Earth control to use the new Bing logo and you may have wondered why the Silverlight map control was not also updated? The reason is that the logo is a resource in the Silverlight control assembly and is not pointing to an external file.
So does that mean we have to wait for a new release of the Bing Silverlight map control before the logo will get changed? Well yes and no, if you want it to be automatically changed you will have to wait for the next release but there is nothing stopping you changing it yourself now by following the steps below.
Step 1 – Getting your project setup
If you don’t already have a Silverlight project setup with the Bing silverlight maps (Virtual Earth) control working see Chris Pietschmann’s excellent getting started tutorial.
Step 2 - Getting the new logo
You can download the new Bing logo from the url below:http://www.bing.com/maps/i/logo_powered_by.png
Save this to a folder in your Silverlight project (for example Images) and then in Visual Studio ensure you include the new image in your Silverlight project and set it to be “Content” so that it gets included in the Silverlight xap file.
Step 3 – Hiding the existing logo
You may be asking how we turn off the existing logo? Well luckily the current Silverlight control allows us to hide the logo using the “LogoVisbility” attribute. You can do this in the XAML code as follows:
Step 4 – Adding the new logo
Now we need to add the new Bing logo. This is done by adding an image control and setting its “Source” attribute to point to the new logo file we downloaded in step 2. With a little alignment and margins we can get the logo to be in the same position as the original one. Below is the XAML showing you how to do this.
That’s it your all done.
Hopefully this tutorial has shown you just how easy this is to update. We could of course have used the online image file as the source of the image control, rather than including the new file in our application, but that might cause issues in future if Microsoft change the name of the file, or resize it. You can download a sample project showing the new logo below: