XAP files are used to submit applications to the Windows Phone Marketplace.
Story
I was trying to submit an app to the marketplace and kept on getting the same error, no matter how many times I rebuilt the solution and deployed the solution.
The XAP file is located in the <project>\bin\debug directory.
The timestamp on the file was not changing....
I do not know why, the documentation may have been pushing me towards it. I opened Expression Builder and rebuilt the project (under the tools menu), and this rebuilt the XAP file.
I haven't spent much time using Expression Builder yet, I need to visit it when I make my app perform well under both orientations.
Thursday, November 4, 2010
Friday, October 29, 2010
What does this mean? Is the class supported on Windows Phone? Am I just not reading it right?
http://msdn.microsoft.com/en-us/library/system.globalization.hebrewcalendar(VS.95).aspx
http://msdn.microsoft.com/en-us/library/system.globalization.hebrewcalendar(VS.95).aspx
Platform Notes
Silverlight for Windows Phone:
This type is present but is not supported on Windows Phone.Version Information
Silverlight
Supported in: 4, 3Silverlight for Windows Phone
Supported in: Windows Phone OS 7.0HebrewCalendar on Windows Phone 7 - Gotcha in leap years
Try converting a hebrew calendar date in Elul in a leap year using this code:
DateTime myDateTime = new DateTime(1995, 9, 1);
DateTime returnDateTime;
HebrewCalendar hebrewCalendar = new HebrewCalendar();
int jyear;
int jmonth;
int jday;
jyear = hebrewCalendar.GetYear(myDateTime);
jmonth = hebrewCalendar.GetMonth(myDateTime);
jday = hebrewCalendar.GetDayOfMonth(myDateTime);
returnDateTime = hebrewCalendar.ToDateTime(5767, jmonth, jday, 0, 0, 0, 0);
This will cause an error as 5767 is not a leap year and there are only 12 months in a non leap year, and jmonth is 13 in the code above.
(Elul is month 12 in non leap years and month 13 in leap years).
Solution
If the beginning year is a leap year and the end year is not a leap year
and the month index is greater than 7 //Adar II
then move the month back one
If the beginning year is not a leap year and the end year is a leap year
and the month index is greater than 7 //Adar II
then move the month forward one
bool isLeap1 = hebCal.IsLeapYear(hYear);
bool isLeap2 = hebCal.IsLeapYear(year);
if ((isLeap1 & !isLeap2) & hMonth > 7)
{ hMonth--; }
if ((!isLeap1 & isLeap2) & hMonth > 7)
{ hMonth++; }
Links:
http://www.hebcal.com/converter/?hd=11&hm=Elul&hy=5771&h2g=Convert+Hebrew+to+Gregorian+date
http://msdn.microsoft.com/en-us/library/system.globalization.hebrewcalendar(VS.95).aspx
This is a good right up with some examples on the HebrewDate class in C#.
http://www.ziporah-greve.net/prog/jewish-csharp.html
Side note:
This became much clearer to me when I had to create example code from my code.
DateTime myDateTime = new DateTime(1995, 9, 1);
DateTime returnDateTime;
HebrewCalendar hebrewCalendar = new HebrewCalendar();
int jyear;
int jmonth;
int jday;
jyear = hebrewCalendar.GetYear(myDateTime);
jmonth = hebrewCalendar.GetMonth(myDateTime);
jday = hebrewCalendar.GetDayOfMonth(myDateTime);
returnDateTime = hebrewCalendar.ToDateTime(5767, jmonth, jday, 0, 0, 0, 0);
This will cause an error as 5767 is not a leap year and there are only 12 months in a non leap year, and jmonth is 13 in the code above.
(Elul is month 12 in non leap years and month 13 in leap years).
Solution
If the beginning year is a leap year and the end year is not a leap year
and the month index is greater than 7 //Adar II
then move the month back one
If the beginning year is not a leap year and the end year is a leap year
and the month index is greater than 7 //Adar II
then move the month forward one
bool isLeap1 = hebCal.IsLeapYear(hYear);
bool isLeap2 = hebCal.IsLeapYear(year);
if ((isLeap1 & !isLeap2) & hMonth > 7)
{ hMonth--; }
if ((!isLeap1 & isLeap2) & hMonth > 7)
{ hMonth++; }
Links:
http://www.hebcal.com/converter/?hd=11&hm=Elul&hy=5771&h2g=Convert+Hebrew+to+Gregorian+date
http://msdn.microsoft.com/en-us/library/system.globalization.hebrewcalendar(VS.95).aspx
This is a good right up with some examples on the HebrewDate class in C#.
http://www.ziporah-greve.net/prog/jewish-csharp.html
Side note:
This became much clearer to me when I had to create example code from my code.
Wednesday, October 27, 2010
DateTime picker?
The DateTime picker is not in the original developer toolkit, but it is in a new download.
Silverlight for Windows Phone Toolkit - Sept 2010
http://silverlight. codeplex.com/releases/view/ 52297?
Silverlight for Windows Phone Toolkit - Sept 2010
http://silverlight.
Phone Emulator orientation and keyboard input
When using the phone emulator with the PC keyboard the Orientation of the app does not change.
Radio Button groups
- There is no Tab Group box in the toolbox
- Solution: use GroupName in the .xaml file
- eg.
GroupName="MyRadioBtnGroup"/>
<RadioButton Content="Female" Height="72" HorizontalAlignment="Left" Margin="292,177,0,0" Name="femaleRadioButton" VerticalAlignment="Top" Checked="femaleRadioButton_Checked"
GroupName="MyRadioBtnGroup"/>
The traditional way of dealing with multiple radio buttons, with "one checked" behaviour, is to put the Radio Buttons in a group box. The Toolbox in the Windows Phone 7 Toolkit does not have a group box.
I found the solution here: http://social.msdn.microsoft.com/Forums/en/windowsphone7series/thread/89cf0ad0-e4bd-4baf-9532-157c30f3fd81
I was trying to do it programatically, and could not find a simple way to programatically set the state of the Radio Button, trying to use SetValue required a DependencyProperty...
Subscribe to:
Posts (Atom)