Windows Phone Developers

Monday, May 13, 2013

How to Track Page (Pivot Item) Navigation in Windows Phone using .NET (C#) / Windows Phone Pivot Control Events (C#/.NET)

Pivot_Change /SelectionChange  / Page Change Event in Windows Phone using .NET

One of the commonly used Windows Phone Application Type is Pivot. A Pivot application has a Pivot control and many Pivot Items in it.
This gives a good look and feel for content rich App


How to track Pivot Item Change

Each Pivot item contains some unique information, which makes it a necessary for tracking the change of Windows Phone Pivot Items

The XAML of the Pivot Control is shown below

 <controls:Pivot Title="GNANA BHOOMI - TIRUVANNAMALAI" SelectionChanged="Pivot_SelectionChanged>;





The Pivot_SelectionChanged event can be used to track the flip / change of Pivot Item to a new one by the user


private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)



{
 
MessageBox.Show(((Pivot)sender).SelectedIndex.ToString());



}

SelectedIndex property provides the Index of the active Pivot Item
Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Microsoft Big Data Solutions - Hadoop / Hive and SQL Server

How to create Big Data solutions in Microsoft Framework

For quite a while Microsoft developers were baited by Open source folks on the advancement of Big Data solutions in the open source world.

Hadoop + Hive + Pig + R gave a very good platform for Big Data solutions in Open Source platform. Slowly there are many licensed versions that are coming out of the same stack - Cloudera,  Revolutionary R etc.

Microsoft had started Big Data based solutions long back in the Labs have released different tools like PowerPivot etc. Now Microsoft has its own Big Data Technology Stack

Microsoft's Big Data Technology Stack


HDInsight is Microsoft’s Hadoop-based distribution that is available on Windows Azure

The platform can be used for storing large chunks of data (as Blobs, Tables, Columnar Database etc)


SQL Server 2012 is used for Analysis and Integration (ETL)
the SQL Server instance and the Hadoop/Hive data warehouse are
configurable to establish connectivity between them



Real-Time Example of Big Data Solution using Microsoft Technology Stack


(Big Data Solution Courtesy: Ayad Shammout's SQL & BI Blog)
Ayad Shammout's SQL & BI Blog explains how the components are used in various stages effectively for analysing the Audit Logs











 Microsoft's Statistical Component / Solution

Big Data is not data alone - it's more to do with Analyzing the Data. Microsoft has SQL Server 2012 Analysis services. However, certain analysis require custom coding / statistical analysis

Microsoft's Cloud Numerics (now in Azure labs) does exactly the same





Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon

Saturday, March 16, 2013

How to Bind Grid to a DataSource in Windows Phone using C#

How to Data Bind an Object to ListBox Control using C#.NET / Data Templates in C# Windows Phone Application

My director friend Kee Ran was pestering for an App that provides a list of Girivalam (a circumambulation) dates for his assistance. Attempted the same using Silverlight Data Template (Listbox) . The original grid as shown below:

 
 
 

It's been quite sometime since we had used a databinding (How to Bind an Object to TextBox)  First things first, let us create a class that will hold this data

public class GirivalamDates

{

public string GirivalamMonth { get; set; }

public string GirivalamStartDt { get; set; }

public string GirivalamStartTime { get; set; }

public string GirivalamStartDay { get; set; }

public string GirivalamEndDt { get; set; }

public string GirivalamEndTime { get; set; }

public string GirivalamEndDay { get; set; }



}

}


Once the class is created, create some objects of this type and it to a List.

    gDates = new List();
            gDates.Add(new GirivalamDates
            {
                GirivalamMonth = "Mon",
                GirivalamStartDt = "Start",
                GirivalamStartTime = "Date",
                GirivalamStartDay = "   ",
                GirivalamEndDt = "End  ",
                GirivalamEndTime = "Date",
                GirivalamEndDay = "   "
            }); 
Add more to the List and then, create the XAML for the same




 


<StackPanel x:Name="ContentPanel" Margin="12,0" Grid.Row="1">



<ScrollViewer HorizontalScrollBarVisibility="Visible">



<ListBox

Name

="myItemsControl" VerticalAlignment="Top">



<ItemsControl.ItemTemplate>



<DataTemplate>



<Grid>



<Grid.ColumnDefinitions>



<ColumnDefinition Width="100"/>



<ColumnDefinition Width="100"/>



<ColumnDefinition Width="100"/>



<ColumnDefinition Width="100"/>



<ColumnDefinition Width="100"/>



<ColumnDefinition Width="100"/>



<ColumnDefinition Width="100"/>



</Grid.ColumnDefinitions>









<TextBlock


Grid.Column="0" Text="{Binding GirivalamMonth}"


FontSize="{StaticResource PhoneFontSizeMedium}"


/>



<TextBlock


Grid.Column="1" Text="{Binding GirivalamStartDt}"


FontSize="{StaticResource PhoneFontSizeMedium}"


/>



<TextBlock


Grid.Column="2" Text="{Binding GirivalamStartTime}"


FontSize="{StaticResource PhoneFontSizeMedium}"


/>



<TextBlock


Grid.Column="3" Text="{Binding GirivalamStartDay}"


FontSize="{StaticResource PhoneFontSizeMedium}"


/>



<TextBlock


Grid.Column="4" Text="{Binding GirivalamEndDt}"


FontSize="{StaticResource PhoneFontSizeMedium}"


/>



<TextBlock


Grid.Column="5" Text="{Binding GirivalamEndTime}"


FontSize="{StaticResource PhoneFontSizeMedium}"


/>



<TextBlock


Grid.Column="6" Text="{Binding GirivalamEndDay}"


FontSize="{StaticResource PhoneFontSizeMedium}"


/>



</Grid>



</DataTemplate>



</ItemsControl.ItemTemplate>



</ListBox>

</

ScrollViewer>



</StackPanel>

The TextBlock's Text attribute is bound to the appropriate property of the GirivalamDates class.

Finally bind the ListBox control to the gDates object.

myItemsControl.ItemsSource = gDates;


Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon