Thursday, December 13, 2012

Windows store App : enable type-to-search feature in other page


In your xaml code u bind these to events to page::


    Loaded="pageRoot_Loaded_1"
    Unloaded="pageRoot_Unloaded_1"


and inside these methods u have to bind and unbind ur events for keydown or keypress ::


    private void pageRoot_Loaded_1(object sender, RoutedEventArgs e)
    {
        SearchPane.GetForCurrentView().ShowOnKeyboardInput = true;
    }



This is enough for enabling for type tp search

if there is a some requirement u can also use the following by setting it to false


    private void pageRoot_Unloaded_1(object sender, RoutedEventArgs e)
    {
        SearchPane.GetForCurrentView().ShowOnKeyboardInput = false;
    }

Thursday, November 29, 2012

Convert json date to C#, code for tested for windows 8 and android devices developed with mono and ,


 Convert json date to C#, code for tested for windows 8 and android devices developed with mono and ,
this method uses "TimeZoneInfo.Local" Most of the time it will return in GMT(GreenWich Mean Time format)

public string ConvertJsonDateToDate(string dateString)
{
    string ConvertedDate = null;
    if (string.IsNullOrEmpty(dateString))
    {
        return DateTime.Now.ToString();
    }
    Regex re = new Regex(@"(\d+)([-+]\d{4})");
    Match match = re.Match(dateString);
    long timestamp = 0; int offset = 0;
    if (!string.IsNullOrEmpty(match.Groups[1].Value))
    {
        timestamp = Convert.ToInt64(match.Groups[1].Value);
        offset = Convert.ToInt32(match.Groups[2].Value) / 100;
    }
    ConvertedDate = TimeZoneInfo.ConvertTime(new DateTime(1970, 1, 1).AddMilliseconds(timestamp), TimeZoneInfo.Local).ToString();
    return ConvertedDate + " GMT";

}


Windows 8 app certification requirements


Windows Software Development Kit (SDK) for Windows 8


download link :: http://msdn.microsoft.com/en-US/windows/desktop/hh852363


Windows 8 app certification requirements (Windows)

http://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx

Very Basic of windows stroe app \ windows 8 apps : PLM - Page Lifecycle management in



Following are some of the common Methods available in any xaml.cs file

//Constructor 
public GroupedItemsPage()
{
    this.InitializeComponent();
}


protected override void OnNavigatedTo(NavigationEventArgs e)
{
    base.OnNavigatedTo(e);
}


protected override void LoadState(Object navigationParameter, Dictionary pageState)
{
   base.OnNavigatedTo(navigationParameter, pageState);
}


protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
{
    base.OnNavigatingFrom(e);
}


public ItemDetailPage()
{
     this.InitializeComponent();
}



protected override void OnNavigatedFrom(NavigationEventArgs e)
{
    base.OnNavigatedFrom(e);
}


protected override void SaveState(Dictionary pageState)
{
    base.SaveState(pageState);
}


(eg - first page name is GroupedItemsPage  and  second page name is ItemDetailPage) 

Onstart Up 1st it calls the Constructer With no Doubt,  

the 2nd hit is OnNavigatedTo method 

the 3rd hit is LoadState method

...... while calling any xaml page WinRT executes in these sequence ( Evert time same sequence ... ), 

When we are clicking on a some other page Link or item 

1st it calls OnNavigatingFrom method 
2nd it calls Constructer of the second page i.e. ItemDetailsPage
3rd OnNavigatedFrom
4th SaveState

Wednesday, November 21, 2012

Extended Splash Screen in Windows 8 Apps

U can these following links For Help

http://www.windows8designhandbook.com/designing-a-windows-8-splash-page.html


http://www.c-sharpcorner.com/UploadFile/99bb20/extended-splash-screen-in-metro-style-application/

http://msdn.microsoft.com/en-us/library/windows/apps/hh465338.aspx