Great news! Unifying Developer Registration: Windows and Windows Phone
Showing posts with label Windows Phone. Show all posts
Showing posts with label Windows Phone. Show all posts
Thursday, November 7, 2013
Monday, August 26, 2013
Ho to use XML files In WinPhone
If we are storing static data in our Win Phone app, xml files can be used for that.
Following sample explains how to do that:
<CountrList>
<country name="Abkhazia" capital ="Sukhumi" />
<country name="Afghanistan" capital ="Kabul" />
<country name="Albania" capital ="Tirana" />
</CountrList>
we can bind xml data to a list by using following code
<ListBox Name="lstData"
ItemsSource="{Binding}"
DisplayMemberPath="objMyList" />
select new clsWorldList
{
MyName = elem.Attribute("name").Value,
Following sample explains how to do that:
<CountrList>
<country name="Abkhazia" capital ="Sukhumi" />
<country name="Afghanistan" capital ="Kabul" />
<country name="Albania" capital ="Tirana" />
</CountrList>
we can bind xml data to a list by using following code
<ListBox Name="lstData"
ItemsSource="{Binding}"
DisplayMemberPath="objMyList" />
public class clsWorldList
{
public string MyName { get; set; }
public string MyCapital { get; set; }
}
{
public string MyName { get; set; }
public string MyCapital { get; set; }
}
....
....
var xElem = XElement.Load("XML/List.xml");
var objMyList =
from elem in xElem.Descendants("country")
orderby elem.Attribute("name").Value
from elem in xElem.Descendants("country")
orderby elem.Attribute("name").Value
select new clsWorldList
{
MyName = elem.Attribute("name").Value,
MyCapital = elem.Attribute("capital").Value,
};
};
lstData.DataContext = objMyList ;
Sunday, August 4, 2013
List of Images needed for WinPhone app
Here goes the list of Images needed for WinPhone app:
Application Image's:
ApplicationIcon (100x100)
FlipCycleTileSmall (159x159)
FlipCycleTileMedium (336x336)
FlipCycleTileLarge (691x336)
StoreTitle (300x300)
BackGroundImage (1000x800)
Show case Image's:
480 x 800
720 x 1280
768 x 1280
Application Image's:
ApplicationIcon (100x100)
FlipCycleTileSmall (159x159)
FlipCycleTileMedium (336x336)
FlipCycleTileLarge (691x336)
StoreTitle (300x300)
BackGroundImage (1000x800)
Show case Image's:
480 x 800
720 x 1280
768 x 1280
Tuesday, April 9, 2013
Passng Data Between Pages in Windows Phone
•Can pass string data between pages using query strings
private void passParam_Click(object sender, RoutedEventArgs e)
{
NavigationService.Navigate(new Uri("/SecondPage.xaml?msg=" + textBox1.Text, UriKind.Relative));
}
{
NavigationService.Navigate(new Uri("/SecondPage.xaml?msg=" + textBox1.Text, UriKind.Relative));
}
•On destination page
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
string querystringvalue = "";
if (NavigationContext.QueryString.TryGetValue("msg", out querystringvalue))
textBlock1.Text = querystringvalue;
}
{
base.OnNavigatedTo(e);
string querystringvalue = "";
if (NavigationContext.QueryString.TryGetValue("msg", out querystringvalue))
textBlock1.Text = querystringvalue;
}
Overriding the Back Key in Windows Phone
<phone:PhoneApplicationPage
x:Class="PhoneApp1.MainPage"
…
shell:SystemTray.IsVisible="True"
BackKeyPress="PhoneApplicationPage_BackKeyPress">
In code:
private void PhoneApplicationPage_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = true; // Tell system we've handled it
// Hide the popup...
...
}
Subscribe to:
Posts (Atom)
How to upload app to macOS
1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...
-
1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...
-
Generating an API Key Before you can add an Apple Developer Account to Visual Studio, you'll need to generate an API Key. Generating a...
-
Log in to the Play Console: Go to the Play Console website ( play.google.com/console ) and log in with your Google Play Developer account....