windows-phone-7

How do you test for permissions on WP7?

Is there a way to simulate whether permission are granted or denied to use services like location on the Windows Phone 7? I want to get the users current location, but I can't seem to find away to make the phone show me the permissions dialog so that I can deny access to it for testing? Anyone else have these kinds of issues? I'm finding...

Why won't controls stretch in WP7?

Here is a simple XAML snippet: <Grid x:Name="ContentGrid"> <ContentControl Background="Yellow" VerticalAlignment="Stretch"></ContentControl> </Grid> In WPF, the content control stretches the entire height of the grid. In WP7 however, the content control does not stretch. Why? ...

Windows Phone 7 emulator support any GPS device for development

I am developing for Windows Phone 7. My application uses GeoCoordinateWatcher to detect user current position. Now my client is asking me to test GPS functionality. But i don't have Windows Phone 7 mobile available here. I want to connect a GPS receiver with my laptop and somehow connect that to Windows Phone 7 emulator so the emulator...

How to stop the WP7 pivot control handling the Flick Gesture event in Silverlight Toolkit

I have a Pivot Control in my WP7 app that by nature responds to left and right swipes to move between the pivot items. I then want to use the Flick Gesture on a UserControl (a small UI segment on my page) for something else. My user control does handle the event but so does the Pivot control, so it navigates to the next item. I have n...

Silverlight on WP7

Hi guys, I'm going to get a WP7 silverlight project at work, and I'd like to ask you guys what documentation do you recommend to somebody who's willing to write silverlight apps for WP7 but who's never touched silverlight itself before. Thanks in advance, Miloud B ...

Shake control for Windows Phone 7

How would I use the accelerometer in WinPho7 to detect shaking the phone and have that trigger an event. For example, to roll dice, you would shake the phone. ...

Right-aligning button in a grid with possibly no content - stretch grid to always fill the page

Hello people, I am losing my patience with this. I am working on a Windows Phone 7 application and I can't figure out what layout manager to use to achieve the following: Basically, when I use a Grid as the layout root, I can't make the grid to stretch to the size of the phone application page. When the main content area is full, all ...

WP7 Popups using resources

Im trying to create my own(custom design) popup for my WP7 application. To put it shortly it should only display bing map with a drawn route and a close button. I have used the Picker Box by from Alex Yakhnin's Blog. And by his code as a reference i have made my custom xaml file with the following (only basic design, maps and button le...

get a map with pushpin from Bing [silverlight]

Hi all, I tried to dvlp an applic for WP7. This applic must "ask" bing services to retrieve a map with pushpins (POI like train stations or metro stations). In my applic I want to get the pushpins collection and use it to do something else. The matter is that I don't know how to get this map from Bing Maps. Is somebody have an idea ? T...

WP7 silverlight grid

In order to learn silverlight on WP7 I'm playing with it around and well, I can't say I'm having sweet times here. I'm developing a simple, yet ugly Mine game (like windows's ^^). The problem is that I'm gonna use a button for each case on the mines board, but I can't manage to find a way to preview a grid with cells containing my butto...

Is there a way to customize the on screen keyboard of a text box?

Say I need to write an hexadecimal editor. I could write my own textbox with my own on screen keyboard. Or is it possible to change the onscreen keyboard of the regular text box to show only (0-9) (A-F)? If so, where can I find a sample? ...

System.Windows.Browser in Windows Phone

Hi, I'm trying to open a webpage in a Silverlight App for Windows Phone 7. Is there a way to open Internet Explorer? ...

Is MD5 supported on Windows Phone 7?

I'm porting some compact framework code that consumes a RESTful service to Windows Phone 7. The REST service requires md5 hashing and method signatures. This code (which worked on NETCF) no longer compiles and I don't see anything MD5 related in the object browser. MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); buffer =...

Tip screen at startup that can be disabled.

I am planning on creating a tip page that pops up with directions on how to use the app, and can be turned off with a checkbox. I imagine that in order to save the state of the checkbox's selection, I need top store it as a boolean somewhere on the system. Would this be done in something like a txt file stored locally using IsolatedSto...

WP7 Bing map in popup

I'm working on a WP7 demo app and have gotten my popup working with static resources wich I earlier had problems with. Now when this is out of the way i got a new bug wich regards my use of Bing Maps. When using bing maps in my default WP7 Silverlight pages (panorama or regual) the maps show up fine, but when using a bing map in my stat...

How to debug serialization error in tombstoned WP7 app

I am handling the current state of my WP7 app in the OnNavigatedFrom and To events so that if the app is tombstoned OR they navigate to a different page it saves the state to the inbuilt PhoneApplicationService state. I have a simple ViewModel which I dump to the state to make life easier. When navigate to a different page within my app...

WP7 Silverlight grid not showing content

Hi guys, It's been 2 hours of struggle against SL grid on WP7. I build my grid using the following code: public void initUIBoard() { int x, y; Button b; for (x = 0; x < mine.cRows; x++) { RowDefinition rd = new RowDefinition(); rd.Height = new GridLength(20); ...

TextBlock.TextWrapping - how to make the text wrap so that the lines are center-aligned?

In a Windows Phone 7 application, when I place a TextBlock in the grid and set its HorizontalAlignment to "Center" and its TextWrapping to "Wrap", why does the text that overflows the width of the container and is placed on the next line, align with the left side of the otherwise center-aligned block? Is there any way to setup text wrap...

Issue with MVVMLight ViewModelBase public parameterless constructor in inherited base class for WP7 Tombstoning

I am handling tombstoning in Wp7 by dumping my ViewModel into the PhoneApplicationService state (see this link for more info). My ViewModel (VM) inherits from the MVVM Light Toolkit (ViewModelBase) which has a protected parameterless constructor only. This causes the serilization to fail with: "The type 'GalaSoft.MvvmLight.ViewModelBa...

SIlverlight WP7 switch screen

Hi, How to switch between screens programatically in silverlight on WP7 guys ? Thanks ...