Programming for Windows Phone / Windows 10 Mobile | Questions and answers



Rep: (195)
Attached Image


FAQ
1.Question: And who can explain how to work with the memory of the phone? For example, open and save files, create folders, etc.?
Answer: Work with a piece of phone memory which is a sandbox for the program.
http://blog.zwezdin.com/ru/201

2.Question: But do not tell me how to get the source code of the site page?
Answer: Normal GET request.

3.Question: By the way, who knows what about the native code? Something said before about the possibility of using COM.
Answer: Only OEMs can interact with unmanaged code.

4.Question: How to register (or whatever) the settings page so that you can see in Settings in Application Settings?
Answer: At the moment, no, use a separate page in your application.

5.Question: Tell me, how can a XNA application add a text file or a file with parameters to the resources (not the application settings), and then read it in the program?
Answer: I use Application.GetResourceStream in my project. This method returns a StreamResourceInfo, from there you can pull the stream through the Stream property. But I'm afraid that with XNA this will not work, although for both of them Application is a static class, but it's worth a try. And yes, the main thing in the properties of the file itself is to put Build Mode on Content.
Here is an example of use:
var stream = Application.GetResourceStream (new Uri (path_to_file_of_relative_package, UriKind.Relative)). Stream;

6.Question: How do I make a block with large text? A simple TextBlock displays only one line.
Answer: Just set the TextWrap property = Wrap

7.Question: Is there something like a device name or owner name in WP7? By analogy with WM 6.5 (CurrentUser \ ControlPanel \ Owner Name key)
Answer: Not a name, but a unique identifier, moreover, an anonymous one (not according to Senka's head, a simple developer knows the name of the user)
string id = UserExtendedProperties.GetValue ("ANID") as string;
string realid = id.Substring (2, 32); // otherwise it will be non-unique

8.Question: How easy is it to break WP7 application (* .xap)? Applications written in .net, for example, are edited in a notebook, a separate software, you can view the source code.
Answer: Relatively easy to install on unlocked device

9.Question: Are there any ways to protect the code? By analogs with obfuskatsii in C #.
Answer: The same obfuscation works on WP7. Preemptive Dofuscator from version 4.9 can obfustsirovat whole XAP.

10.Question: Where and how best to store the application settings? On WM 6.5 I used a ready-made class for working with ini files, the configuration file was stored in the program folder.
Answer: IsolatedStorageSettings or Isolated Storage. The first option is preferable for small data, because serialized to XML.

11.Question: Is it possible to realize the sale of applications without AppHub? I would like to start selling "locally" first, say, based on linking the serial number to any PDA parameter
Answer: The non-advanced user (and most of them) will send the forest. "I have to 'unlock' the device with a perverted method, it's unclear to download, which is not clear from where, and it is also not clear where to pay ?????"

12.Question: Why when using WebClient my application hangs, even on a separate thread.
Answer: The current implementation of the WebClient runs in the application's UI thread. Use HttpWebRequest.


Open source software
IE Search Switcher - Fast switching search engines


useful links


Post has been editedKoteiko - 06.12.15, 13:04
Reason for editing: Topic name



Rep: (482)
I suspect that the RSS readers will be just for the seven =)
Given that citizens from MS in their examples, too often (at the moment three pieces saw) choose "application for reading RSS".
One example



Rep: (482)
Official Russian-language portal

Application Development for Windows Phone 7

Read in Russian about the development for WP7 here:

Sergey Zvezdin's blog

45 days with Windows Phone 7


See and listen in Russian:

Techdays

Resources in English wagon and a small truck, officially advised to startfrom here .

Most of the new publications on the topic falls into the issuesthis magazine.

Petzold's Programming Book for WP7

WP7 Development Tips Part 1uniquely useful article. Many pitfalls and ways to circumvent them for WP7 developers.

How to.

For those who are not familiar with Silverlightbook Lawrence Moroni Introduction to Microsoft Silverlight 3(in Russian, freely downloaded from Microsoft).

Post has been editedS_K - 19.11.10, 14:36



Rep: (60)
Microsoft translated Petzold’s book into Russian. Maybe someone will be interested.
Attached filemsphone7book_RUS.pdf(3.58 MB)



Rep: (1)
Help with the launch of the emulator. After compiling, the emulator does not start, but gives an error: "Error: an instance of windows phone emulator is launched with different user access privileges ..." Then he asks to restart the emulator.

It seems to write that this is because of the RAM. I have it a little less gig. RTOS Windows 7.



Rep: (767)
HOMPAIN,
Maybe he just does not run from the admin?



Rep: (60)
HOMPAIN, very much may be due to RAM. I ran it on a PC with 1 GB, so the emulator was loaded for a very long time and was terribly slow.



Rep: (17)
I ran it on a PC with 1 GB, so the emulator was loaded for a very long time and was terribly slow.

I think that he braked because of the video card. If you read the requirements, the video card must support DirectX 10+ and WDDM 1.1. At first, the emulator also slowed down, I had to buy a new video card.



Rep: (1)
It does not slow me down, but it simply does not start (. I tried to run the studio from the admin, it did not help.

I see ION LE without the support of 10 direct X, I can grunt before ION, 10 is supported in it. May I help?



Rep: (1)
Need to independently check whether the sprite is on the screen before rendering in the Update function?
How for animation to display individual elements of the picture? Do you have to break the picture?



Rep: (0)
But do not tell me how to get the source code of the site page and for example save it to a text file, if we are talking about wp7 and silverlight?

And who can explain how to work with the memory of the phone? For example, open and save files, create folders, etc.?

Post has been editedcarlos0n - 19.09.10, 18:14



Rep: (482)
And who can explain how to work with the memory of the phone? For example, open and save files, create folders, etc.?

work with a piece of phone memory which is a sandbox for the program
http://blog.zwezdin.com/ru/201


And do not tell me how you can get the source code of the site page


see towards webclient



Rep: (195)
Has anyone tried to register as a student in the market?



Rep: (85)
To register as a student \ student you need an ISIC passport. It can be done in travel agencies (at least I did it in Vitebsk in 2000 or 2001), it is issued for a year, then you can download MSDN versions of Melkosoft products and register for free on any portals .... Now a friend of mine ordered himself ISIC, let's see what can be done with it on the Marketplace ... but I doubt that it will be possible to put something for sale for free ....



Rep: (1)
ISIC is optional. I registered via email, which they gave us at MSU.

If you register as a student, you will not have to pay an entrance fee of 99 bucks and you can send 5 applications for free.



Rep: (60)
Maybe someone will be interested in:
http://blog.zwezdin.com/ru/228

Post has been editedSGregory - 28.09.10, 11:55



Rep: (60)
Attended the event, felt a little WP7 phone, cool :)

Post has been editedSGregory - 28.09.10, 11:55



Rep: (82)
By the way, who knows what about the native code? Something said before about the possibility of using COM.
And yes, how to register (or whatever) the settings page so that you can see in Settings in Application Settings?



Rep: (482)
proplayer666 @ 10/03/2010, 23:35*
By the way, who knows what about the native code? Something said before about the possibility of using COM.

At the moment, iron producers were once promised such an opportunity ...

proplayer666 @ 10/03/2010, 23:35*
And yes, how to register (or whatever) the settings page so that you can see in Settings in Application Settings?

at the moment no way, use a separate page in your application.



Rep: (482)
Has writtensome little thingsabout windows phone 7.

Many things (and abusive and not) before the official release can not tell.

So far I can say that the development process for this platform is very convenient and pleasant (it was possible to overcome the past hostility towards the managed code) even in spite of the limitations and the absence of many necessary things. Unfortunately, I can’t say so about the rest of this platform.



Rep: (1)
Tell me, how can a XNA application add a text file or a file with parameters to the resources (not the application settings), and then read it in the program?


Full version    

Help     rules

Now: 06/27/19, 15:46