Thursday, September 26, 2013

Windows Phone 8 development - Change icon color depending on phone background

Smart way to change icon color:

<Border x:Name="Wifi" Width="76" Height="76" 
                    HorizontalAlignment="Right" VerticalAlignment="Bottom" 
                    Background="{StaticResource PhoneForegroundBrush}"                                Margin="0,0,360,82" Tap="WhenTappedWifi" >
        <Border.OpacityMask>
             <ImageBrush ImageSource="Assets/Tiles/Custom/wifi.png" />
        </Border.OpacityMask>
</Border>

Windows Phone 8 - Navigate To and From Page

I needed a solution to change the state of an element when going back to the page where it was.
I tried the Loaded event, but this did not do the trick.
What worked was Page Navigation:

protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
{
    base.OnNavigatedFrom(e);

    // code
}

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
    base.OnNavigatedTo(e);

    // code
}

Source: http://nicksnettravels.builttoroam.com/post/2011/03/07/Windows-Phone-7-Tombstone-Frustration.aspx

Tuesday, September 24, 2013

Windows Phone 8 Apps - Icon collection sources

I have found myself looking for icons many times.
So I have decided to create a list with good sources.
Here it is, to be continued...

http://www.geekchamp.com/icon-explorer/introduction

Windows Phone 8 - Launch built-in apps - LaunchUriAsync

Few functions with LaunchUriAsync method:


http:[URL]To launch web browser and navigate to specific web URL address
mailto:[email-address]To launch email app with To is set to email-address specified
ms-settings-accounts:To open Account Settings app
ms-settings-airplanemode:To launch Airplane Settings app
ms-settings-bluetooth:To launch Bluetooth Settings app
ms-settings-cellular:To open Cellular Settings app
ms-settings-emailandaccounts:To launch Email and Accounts Settings app
ms-settings-location:To display Locations Settings app
ms-settings-lock:To launch Lock Screen Settings app
ms-settings-wifi:To open Wi-Fi Settings app
zune:navigate?appid=[App Id]To navigate to app details page on Windows Phone Store
zune:reviewappTo open review page for calling app on Windows Phone Store
zune:reviewapp?appid=[App Id]To launch reviews page for specified app
zune:search?[search parameter]=[value]To search Windows Phone Store
zune:search?keyword=[search keyword]&contenttype=appTo search Windows Phone apps by keyword
zune:search?publisher=[publisher name]To launch Windows Store and search publishers apps

Example:
private async void WhenTappedWifi(object sender, System.Windows.Input.GestureEventArgs e)
        {
            Uri uri = new Uri("ms-settings-wifi:");
            await Windows.System.Launcher.LaunchUriAsync(uri);
        }

Source:

Friday, September 20, 2013

Increase 250 users limit using command line

If you need to perform Load Tests in Visual Studio with more than 250 users, here is what you need to do:

1. Click Start ->  All Programs -> Microsoft Visual Studio 2010 ->Visual Studio Tools, and then right-click Visual Studio 2010 Command Prompt -> Run as Administrator.
2. Type the following command:
 VSTestConfig Licenses /AddKey:AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.

Note: To get the license key:
- login to your MSDN Subscription -> My Product Keys ( https://msdn.microsoft.com/en-us/subscriptions/keys/ ) -> Visual Studio 2010 -> Visual Studio Load Test Virtual User Pack 2010  

Source:


Monday, September 16, 2013

Add Last Save Date to Word Documents




In case you want to keep track when a document was last saved, here is what you need to do:

1. On the Insert tab, in the Text group, click Quick Parts ->Field.
3. In the Categories box, click Date and Time.

4. In the Field names box, click CreateDate, PrintDate, or SaveDate.


5. In the Date formats box, click the date and time format that you want — for example, 2/12/2008 9:45 PM or 12 February 2008.

Source:http://office.microsoft.com/en-001/word-help/insert-the-date-and-time-a-document-was-created-last-printed-or-last-saved-HA010100340.aspx