yashsingh1/xdaforums huggingface dataset:
[Windows Phone 7 Software Development] hazeline:
hmm Great :) Thanks for all your help.. i will start with the tutorials given in channel 9.
[Windows Phone 7 Software Development] Kloc:
I'm going through those right now. Silver light programing is a bit wierd. It's like throwing xml, html, and C# all into one.
[Windows Phone 7 Software Development] X-BLADE™:
Hi,

Actually, right-to-left is very easy. Just right click on the TextBlock, Properties, then look for Text Alignment and change it to Right. I guess this is what you are looking for?

I know emulating is generally slow, but the videos I've seen with my emulator, there was a noticeable difference. The problem is gone now though after I formatted my PC.
[Windows Phone 7 Software Development] X-BLADE™:
Wow, that fixed it, I've tried Tahoma and it worked.

Silly I did not try another font :)

Shokran..
[Windows Phone 7 Software Development] hazeline:
Easier?

Hi, i have tried to use this and i believe it is easier to implement the pivot controls. Get it from this website, all credits to the developer :)

http://www.smartypantscoding.com/blog/1
[Windows Phone 7 Software Development] drowdd:
So you take a 3 credit class, now your a student!
[Windows Phone 7 Software Development] scilor:
If that would be in .net I would take part, but I dislike Silverlight, to bad :D
[Windows Phone 7 Software Development] LifewareSolutions:
Looks like MS whants to start from the beginning.

No more old GDI. WPF is Everywhere!

Probably, there are some reasons for that.

1. In any case good old aps should be ready to run smoothly @ 480x800 resolution. Are they?

2. Sliverlight gives much more power to the developers. Transparency, smooth animation, full color palette, transforms. This is really a huge step ahead.

Even though our Deluxe Moon supports 480x800 we see many ways to get it improved for WP7
[Windows Phone 7 Software Development] LifewareSolutions:
Looking at Android market we can expect custom application download tools.

Though visiting the marketplace is the easiest way for many users. The most important is that we MUST provide high-quality free applications to the market.
[Windows Phone 7 Software Development] Andy7:
i be testing it for two weeks(the platform) and find it interesting(except from the very slow visual studio on my brand new pc) anw i still having trouble with xml...

i have found the following method good idea for a list screen but not to load up settings...

var query = from q in xml.Descendants("setting")
orderby q.Attribute("name").Value
select q.Attribute("name").Value;

do you guys have any better idea to load up single xml elements(for application settings)...
[Windows Phone 7 Software Development] tyrannus:
Dont call them pages...

Instead of trying to find a plugin in the SDK, I'd recommend using a horizontal slider. This will give you that panoramic effect and it is how I am doing it in my app.
[Windows Phone 7 Software Development] jessiethe3rd:
Came across this - thought you guys could use...

I'm not coder (call me the faithful nerdy consumer of your hardwork) but I came across this document online. It's unfortunately just a primer and has instructions on the "Hello Windows Phone" program. I found it a good read and although I am no coder I do see it provides some great insight on Silverlight and XNA.

Enjoy and hope this is not a repost... cheers.

http://charlespetzold.com/phone/index.html
[Windows Phone 7 Software Development] X-BLADE™:
I've been using this for a while and its great.

I can't wait for the final book.

Thanks.
[Windows Phone 7 Software Development] Bigboy20769:
Dual Layout

Is it possible to create two different layouts and select one of layout via button click or setting or orientation value?

Thanks
[Windows Phone 7 Software Development] aquaseal:
It sure is! This is one of the things that silverlight excels at. You need to look into styles and themes and you can apply them in any manner; a button click, an orientation change, etc.

take a look at silverlight.net and the getting started areas for more information. Most of the silverlight content will directly apply directly to wp7 or can be converted to wp7 very easily. However, there are a few key differences, such as System.Browser not being in wp7 so you cannot use examples that use that reference.
[Windows Phone 7 Software Development] derFuks:
OAuth

could anyone give me a sample or something like that for how to connecting via OAuth?
[Windows Phone 7 Software Development] anaadoul:
oAuth is an HTTP authentication protocol, there is nothing currently that will allow you to do the work using the CF out of the box, you have to implement the oAuth protocol your self. you can use the same method Classes of oAuth on the desktop but you will notice that there are some encryption methods missing.

I have done an oAuth class for CF before but i'm unable to find it (i wonder where i saved it!), the missing classes and namespaces can be retrieved using the OPEN NET CF community edition so it won't be complicated i guess. it took me several hours to do it earlier (oAuth 1.1 i guess, not sure though, can't really remember).

To start off, you can google "oAuth .NET CF"

Good luck.
[Windows Phone 7 Software Development] dsaxman:
According to what I heard at MIX, any phone can become unlocked - you will need a Windows MarketPlace account ($99) to unlock it for development though. The Phone dev tools are free, so anyone can do it (once they pay the $100 bucks).

As long as you have a MarketPlace developer account to unlock the phone, sure I'm sure someone will, but the app installation via that method would only work after it's unlocked..

Oh, and it doesn't stay unlocked forever, I think they said only 90 days, basically so you'll have to renew your MarketPlace account yearly to keep loading apps w/o MarketPlace oversight.
[Windows Phone 7 Software Development] Kloc:
I signed up as a developer through dreamspark so I'll have to see what the phone unlocking process looks like.
[Windows Phone 7 Software Development] dsaxman:
Basically, you plug it into Visual Studio, it sends the device ID up to the cloud and ties it to your marketplace account (as it was described to us at Mix) and it is unlocked for a certain period of time. You can go into your developer account and lock it back before the timeout. I think they said the max number of unlocked devices per developer would be 5 or 6, but that's all subject to change until it actually rolls this fall.
[Windows Phone 7 Software Development] rkrims:
Timed events? CeRunAppAtTime?

Hi, just taking my first steps into WP7 development...

But actually *stuck* on my first attempt... is there any equivalent to CeRunAppAtTime function? (don't tell me "web based push notifications" please :eek:)

:confused:
[Windows Phone 7 Software Development] vangrieg:
No, there isn't. You can't launch an app automatically, only user can do it.
[Windows Phone 7 Software Development] cizake:
I'm looking to port an Android app to WP7

Mostly for a WP7 compatible UI.

If you are interested let me know.

Thanks

PS: hope I posted in the right spot. Feel free to remove/move if not.
[Windows Phone 7 Software Development] cizake:
Of course I didn't mention it but I'm willing to pay for this.

You can PM me or post here.

Thanks for looking
[Windows Phone 7 Software Development] tyrannus:
If you developer unlock your device, you can get ANY unsigned app installed WITHOUT the source code.

I wrote a simple app deployer that will take a compiled 'xap' file and deploy it to the device that has already been developer unlocked.

I cannot share the app, but it's really not hard to figure it out. You will need the windows phone SDK no matter what.
[Windows Phone 7 Software Development] tyrannus:
Yes, but you could find an alternative that is shipped with WP7. I'm not sure of it off hand, but it might be "Phone.Browser"?
[Windows Phone 7 Software Development] bugsykoosh:
Dev unlocking has more detail now: http://windowsphone.mobilitydigest.com/wp7-developer-unlocking-new-details-on-sideloading/#comments

“The process simply flags that device in the cloud backend and does not change the phone ROM in any way. Once completed, developers can view through the Marketplace website which contains a listing of all their registered devices as well as removing the device registration.”

In toher wors, you need to upload thesource code to the marketplace like a beta app for testing in order to sideload. That doesn't get all the apps in the world on your phon...just your apps.
[Windows Phone 7 Software Development] elizas:
Isolated storage in Silverlight application

We can use Isolated Storage as a virtual file system to store data in a hidden folder on our machine in silverlight application. Silverlight application is allocated the storage of 1 MB per application but we can increase the amount of storage.

This is the function to get the data in the isolated storage

Private Function LoadData(ByVal fileName As String) As String

Dim data As String = String.Empty

Dim isfstream As New IsolatedStorageFileStream(fileName, FileMode.Open, IsolateStorageFileObj)

Dim sr As New StreamReader(isfstream)

data = sr.ReadLine()

Return data

End Function

Eliza
[Windows Phone 7 Software Development] jasonjoo:
Testing accelerometer in emulator?

Is there a way to test the accelerometer in the emulator? Or will we have to wait until we get dev phones on our hands?
[Windows Phone 7 Software Development] Windcape:
In short, no.

Read this article for clarification.
[Windows Phone 7 Software Development] janemanno1:
A core level question on Encryption

Hi,

I am planning to develop an app where it has a lot of text and a lot of images associated with a given set of text, kind of a book.

Anyways, what I have thought that rather than hardcoding the text and images, I would like to have them stored in an XML file or something like that but all encrypted. And the application then decrypts the data on the fly to display while using the app.

So the core question is how or what mechanism should I use to encrypt and decrypt the data? If I use let's say a hardcoded encryption key within the application then there is a 100% chance that anyone who can off load the app will be able to to see figure it out. If I use a security certificate then the public key is shipped with the application and the private key is kept with me, how does the application then decrypt the data?

I hope this all makes sense. Please ask further questions if needed.

Cheers :)
[Windows Phone 7 Software Development] Windcape:
Well, basically you can't do it. No matter what, you'll need the public key to be shipped with the application, so the content will always be possible to decode.

The only reason to add the security certificate would be to avoid people modifying the content -- but why would that matter, as it's only done on their personal copy, after they paid.

And eventually the public key would be replaceable as well, though decompilation of the .NET code and XAML.

Better not to worry about encryption at all, and just focus on a nice user experience, with plenty of speed.
[Windows Phone 7 Software Development] janemanno1:
Thanks Windcape. I had a feeling that, this would be the answer. Thanks again.
[Windows Phone 7 Software Development] aleksandar.toplek:
XNA and Color Scheme

Is there any way to get theme colors like in Silverlight?
[Windows Phone 7 Software Development] Agent Zach:
Assuming if you're actually using the tools Microsoft released for WP7 development, you can simply open your project in Expression Blend for Windows Phone. SEVERAL themes can be appointed in Expression Blend. You can even design some nice custom ones using only a few clicks. :)
[Windows Phone 7 Software Development] aleksandar.toplek:
I think you didn't understood my question. Application is programmed in XNA GS 4.0 and planed for WP7. Now, i want to create a menu system that will use WP colors (menu is Blue and Black if WP theme is Dark and Blue, menu is Orange and White if WP is Light and Orange). Is there any way to do this in XNA?
[Windows Phone 7 Software Development] Windcape:
You should be able to get the theme info from some environment variables. Try google it :p
[Windows Phone 7 Software Development] HerrVorragend:
Accessing video camera

Hello,

does anyone know, how to access the integrated video camera in Windows Phone 7? I need to "examing" single frames from the Camera, change them and display them to the user...

Thanks for helping
[Windows Phone 7 Software Development] Windcape:
I don't believe there's a public API for this yet.
[Windows Phone 7 Software Development] vangrieg:
That's not possible.
[Windows Phone 7 Software Development] Windcape:
I heard about a hidden API for it this morning: http://twitter.com/thomasmartinsen/status/18831886335
[Windows Phone 7 Software Development] aleksandar.toplek:
5* for your answer XD! I have googled it (and bing it) before i wrote this thread. I didn't find anything about this theme for XNA. That's why I posted here anyways...
[Windows Phone 7 Software Development] Windcape:
Took me 30 seconds to find this, http://msdn.microsoft.com/en-us/library/ff769545(v=VS.92).aspx
[Windows Phone 7 Software Development] Windcape:
But games are developed independent of the phone framework, so the only way you can access the resources is to wrap it in a regular WP7 project, with resource access as displayed in that article.

The only thing that links a regular game project to the phone is the manifest, which is first used at the point of deployment.
[Windows Phone 7 Software Development] pittaman:
[Q] Questions regarding UI

I have setup an app in VS2010 without any of the core logic, just setting up navigation. I have an appbar on the main page to jump from section to section, but I cant get icons on the appbar to show up to save my life.

I also would like to know how to get the slick 'page turn' transition to work when moving from page to page. Do I need to record that in Expression?
[Windows Phone 7 Software Development] Windcape:
1) Use this code sample to add a application-bar:

<phoneNavigation:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="False" IsMenuEnabled="True">
<shell:ApplicationBar.Buttons>
<shell:ApplicationBarIconButton x:Name="ApplicationBarMenuItem1"
IconUri="/Images/appbar.feature.search.rest.png" />
<shell:ApplicationBarIconButton x:Name="ApplicationBarMenuItem2"
IconUri="/Images/appbar.favs.addto.rest.png" />
<shell:ApplicationBarIconButton x:Name="ApplicationBarMenuItem3"
IconUri="/Images/appbar.feature.settings.rest.png" />
</shell:ApplicationBar.Buttons>
<shell:ApplicationBar.MenuItems>
<shell:ApplicationBarMenuItem x:Name="ApplicationBarMenuItem1" Text="Description 1"></shell:ApplicationBarMenuItem>
<shell:ApplicationBarMenuItem x:Name="ApplicationBarMenuItem2" Text="Description 2"></shell:ApplicationBarMenuItem>
<shell:ApplicationBarMenuItem x:Name="ApplicationBarMenuItem3" Text="Description 3"></shell:ApplicationBarMenuItem>
</shell:ApplicationBar.MenuItems>
</shell:ApplicationBar>
</phoneNavigation:PhoneApplicationPage.ApplicationBar>

Also check out how to use vector icons in my reply to this blogpost

2) You have to add transitions manually, but I can recommend using this library to get pivot control for page transitions, or panorama. If you still want to do it yourself, part of this article explains how to do the transition animations.

(Expression) Blend is really good for setting up transitions.

P.S. Just call it Blend, people will know what you're talking about. "Expression" is the product line.
[Windows Phone 7 Software Development] pittaman:
So I did use the sample code to get the appbar functioning. Its the icons I am throwing at it (*.png files) that are not showing up. All i get is a circle with an X for all my images.

Intresting about the transitions. I'll will definately check that out tomorrow.
[Windows Phone 7 Software Development] Windcape:
Remember to check set the correct build action for the images, and to use a proper relative path!
[Windows Phone 7 Software Development] pittaman:
HAHA! Thanks for the lead... It's not Embedded Resource, it's Content. Thanks! That was driving me nuts.
[Windows Phone 7 Software Development] Windcape:
Ah, yes, Embedded Resource is the default. I wasn't sure, but couldn't check atm. ;)
[Windows Phone 7 Software Development] bluefisch200:
Missing UI elements?

Hello,

i am developing a little app to get informations about the bus and train plan in Switzerland. How ever, i am missing many controls in the current SDK.

I have found this: msdn.microsoft.com/en-us/library/ff637515(VS.92).aspx

But there are only Photoshop templates and PFD documents...

Maybe i am blind...:(

Can someone help me?

Edit: Maybe an admin can remove the restriction for posting external links?
[Windows Phone 7 Software Development] Windcape:
Yeah, you would find that the templates aren't in the framework yet. The guides also say that.

Which controls are you looking for here? There's a few mentioned in the stickied resource thread!
[Windows Phone 7 Software Development] bluefisch200:
Right now, only the on to pick a date (also found in the calendar application)...
[Windows Phone 7 Software Development] shinyzhu:
I just created a .NET library for developers to consume REST services with OAuth 1.0 supported. You can use it easily authorize a user or access protected resources just like the codes below.

Authorize a user

var consumer = new Consumer
{
Key = "k",
Secret = "s",
RequestTokenUri = "http://host/oauth/request_token",
AuthorizeUri = "http://host/oauth/authorize",
AccessTokenUri = "http://host/oauth/access_token"
};

var requestToken = consumer.GetRequestToken();
var authorizeUri = requestToken.GetNormalizedAuthorizeUri();
//Redirect to the authorize URI to allow user authorize or deny the service.

//Then use the oauth_verifier to retrieve the access token.
var accessToken = requestToken.ToAccessToken("oauth_verifier_value");

//save the access token for later uses :)

Access the protected resources:

var client = new RestClient();

var request = new OAuthHttpRequestMessage("GET", "http://host/protected/resource").Sign(accessToken);

var responseContent = client.Send(request).ReadContentAsString();

You can find this project on Codeplex: http://lightrest.codeplex.com/

Thank you.
[Windows Phone 7 Software Development] Ooije:
I've used Hammock ( http://hammock.codeplex.com/ ) with OAuth to authenticate with twitter, and it works good :).

But shinyzhu library might be a better choice if OAuth is all you need (since the Hammock dll is quite large).

One thing to think about when using the device emulator:

Since OAuth uses the current date (as UNIX time) in the protocol it could cause problems with the emulator if the clock is wrong.

Unless you remove any file named *.dess in %ProgramData%\Microsoft\XDE\ the clock on the emulator might be wrong which can cause your authentication to fail.
[Windows Phone 7 Software Development] dayyanj:
[Q] Displaying Animated GIFs?

I spent ages creating animated gifs for my application, but unfortunately I cannot get them to display in the standard image control. Does anyone have any secrets to get the animated gifs to display?

The alternative is to convert my gifs to video, but that will add bulk to the end package, which I would like to avoid.

Any help would be greatly appreciated :)

:)
[Windows Phone 7 Software Development] dayyanj:
Things I have tried

This thread is getting a bit of attention, but not a lot of solutions..

These are the things I have tried.

1. Image Control - This doesn't display the gif image at all

2. WebBrowser Control - I tried to display a simple html string (WebControl.NavigateToString("<html><body>Text above image<br/><img src='/images/a.gif' /><br/>text below image</body></html>", UriKind.Relative);

This displayed the text with an image icon, but not the image.

It's looking more and more like I will need to convert several thousand animated gif images into videos, unless someone out there has a solution for me. Seriously you would a legend if you can figure this out!
[Windows Phone 7 Software Development] wildfox:
Maybe you can check this out: imagetools.codeplex.com
[Windows Phone 7 Software Development] delirial:
I think your problem with the WebBrowser control has to do with a bad URL. I don't think that would be the right way to access a local file. To be honest, I don't know if the browser can support local files.

Try this, upload the .gif to a web server. (Maybe a service like imgur.com will do the trick.) And the in your html link to "hxxp://yourserver.com/myimg.gif".

That should tell us whether the webcontrol can display .gif images. (Who knows, maybe it's not even possible.)

Now, if that works, we can take it from there and try to figure out a way to get the browser control to display the local file.
[Windows Phone 7 Software Development] ken52787:
Why don't you split the gif into individual frames and just have code to cycle the images?

Not very elegant, but you don't get the bulk of converting them to video.
[Windows Phone 7 Software Development] dayyanj:
I did consider this option, but with several thousand frames involved, it would be unmanagable. Especially with the next version of my app requiring several hundered thousand frames.

I have started the conversion to video, but now I am having trouble with the MediaElement not displaying the video.. I've started a thread about this error on MSDN forums (http://social.msdn.microsoft.com/Fo...s/thread/9dd2e82c-be05-4676-9cc5-aeb0605c022b) but I am still keen to know a way to display animated gifs as all my work has been done in gif format.
[Windows Phone 7 Software Development] microhaxo:
Back button Event issues!

The app i created works like this (without implementation of the pivot controls)

Mainpage => SecondPage => Thirdpage => Back to Mainpage with collected data shown.

The problem..

Microsoft states that the back button on the main page should exit the app, and anywhere else should go back to the previous location.

my problem..

I am collecting data on every page to eventually display at the very end in a nice list. When the user hits the back button in the WP7 Emulator it appears as if the last state of that page is loaded because textboxes and selections are still selected, even though the user has already saved that information. It is NOT re loaded. Which is essentially my problem. Onload() i check to see if data already exists, if it does i make sure to disable selections that would allow for duplicate data.

Since the phone navigates back to the last state and doesn't re load the page it appears as if the user can re save that data, when in fact it's already been saved and by clicking save again will cause the program to say "You already have this data saved" Which is confusing to the user.

Also since my app navigates back to the beginning loaded with the data in the end, depending upon how much data you enter. You could theoretically hit the back button over 40 times before actually LEAVING, i know they could hit the start button but WHY EVEN MAKE THE BACK BUTTON HAVE THAT FUNCTION, WASTE O TIME and makes it a headache for me to design my app.

SO as a way to fix this horrible design decision, how can i make it so when the user clicks the back button, the page that it goes back to gets "RE LOADED". That way atleast the user can know that the data he/she previously entered was recorded and that they cant re enter it at this time.

The way i had it designed before was

If the user hits back while in the middle of adding data it said "Do want to stop creating a routine?" Then it sent them to the main page. But according to microsoft thats not kosher.

end rant
[Windows Phone 7 Software Development] FreeDee:
Offtopic: Hey, I was looking for an app like that for quite a while, thank you! :)

As far as your assumptions are concerned, you're right: There is no more native coding for Windows Phone 7, you'll have to use Managed Code like C#. I guess you might be able to re-use a good portion of the calculation stuff, as that might easily be portable to C#. However, you would have to create a new UI using Silverlight or XNA (Silverlight would be sufficient for this).