Introduction
This is a Windows store application which I proposed for App Innovation Contest. This application includes the tile feature for user interaction which is an unique feature of Windows store application(i.e..free from buttons). This app includes snapped views, scroll views etc. It supports portrait mode too.
This is actually a "learning to cook" application. With this application one can make their variety of Indian dishes offline by looking through the ingredients list and doing procedure. Dishes are categorised as per locations like North Indian Cuisine, East Indian Cuisine etc. You will be guided with the screenshot for cooking the food step by step.
It is named Mobile chef because you can bring your ultrabook to ur kitchen and you can make a delicious dish with the help of this small application itself...
Code
using Mobile_chef.Data;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Graphics.Display;
using Windows.UI.ViewManagement;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace Mobile_chef
{
public sealed partial class SplitPage : Mobile_chef.Common.LayoutAwarePage
{
public SplitPage()
{
this.InitializeComponent();
}
#region Page state management
protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
{
var group = SampleDataSource.GetGroup((String)navigationParameter);
this.DefaultViewModel["Group"] = group;
this.DefaultViewModel["Items"] = group.Items;
if (pageState == null)
{
this.itemListView.SelectedItem = null;
if (!this.UsingLogicalPageNavigation() && this.itemsViewSource.View != null)
{
this.itemsViewSource.View.MoveCurrentToFirst();
}
}
else
{
if (pageState.ContainsKey("SelectedItem") && this.itemsViewSource.View != null)
{
var selectedItem = SampleDataSource.GetItem((String)pageState["SelectedItem"]);
this.itemsViewSource.View.MoveCurrentTo(selectedItem);
}
}
}
protected override void SaveState(Dictionary<String, Object> pageState)
{
if (this.itemsViewSource.View != null)
{
var selectedItem = (SampleDataItem)this.itemsViewSource.View.CurrentItem;
if (selectedItem != null) pageState["SelectedItem"] = selectedItem.UniqueId;
}
}
#endregion
#region Logical page navigation
private bool UsingLogicalPageNavigation(ApplicationViewState? viewState = null)
{
if (viewState == null) viewState = ApplicationView.Value;
return viewState == ApplicationViewState.FullScreenPortrait ||
viewState == ApplicationViewState.Snapped;
}
void ItemListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (this.UsingLogicalPageNavigation()) this.InvalidateVisualState();
}
protected override void GoBack(object sender, RoutedEventArgs e)
{
if (this.UsingLogicalPageNavigation() && itemListView.SelectedItem != null)
{
this.itemListView.SelectedItem = null;
}
else
{
base.GoBack(sender, e);
}
}
protected override string DetermineVisualState(ApplicationViewState viewState)
{
var logicalPageBack = this.UsingLogicalPageNavigation(viewState) && this.itemListView.SelectedItem != null;
var physicalPageBack = this.Frame != null && this.Frame.CanGoBack;
this.DefaultViewModel["CanGoBack"] = logicalPageBack || physicalPageBack;
if (viewState == ApplicationViewState.Filled ||
viewState == ApplicationViewState.FullScreenLandscape)
{
var windowWidth = Window.Current.Bounds.Width;
if (windowWidth >= 1366) return "FullScreenLandscapeOrWide";
return "FilledOrNarrow";
}
var defaultStateName = base.DetermineVisualState(viewState);
return logicalPageBack ? defaultStateName + "_Detail" : defaultStateName;
}
#endregion
}
} using Mobile_chef.Data;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Graphics.Display;
using Windows.UI.ViewManagement;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace Mobile_chef
{
public sealed partial class ItemsPage : Mobile_chef.Common.LayoutAwarePage
{
public ItemsPage()
{
this.InitializeComponent();
}
protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
{
var sampleDataGroups = SampleDataSource.GetGroups((String)navigationParameter);
this.DefaultViewModel["Items"] = sampleDataGroups;
}
void ItemView_ItemClick(object sender, ItemClickEventArgs e)
{
var groupId = ((SampleDataGroup)e.ClickedItem).UniqueId;
this.Frame.Navigate(typeof(SplitPage), groupId);
}
}
} <VisualState x:Name="Snapped">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="itemListView" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="itemGridView" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
Screenshots


About Me
Actually I started to develop Windows Phone 7 mobile application earlier and published 7 apps in Windows phone marketplace. Stepping up to that I had a passion to develop application for Windows 8 store too. I got to know many things while doing the application and had a gud experience too.
History
This is my 1st version.(i.e)Mobile Chef-Version 1.0.
I'll surely enhance it by adding other countries food too. Plz vote for me if you like this app.