windows-phone-7

How to get files to WP7?

Let's say I'm writing a eBook reader for Windows Phone 7. Now the first thing that the user will need to do is add some books to his device, and since I don't offer a online book store or similar service, the only option is file transfer from his PC to the phone. Is he able to do this, how? Then how do I access this file. Can this file b...

How to save application state (variables' values, button states, etc) in Windows Phone 7 Silverlight application?

Hello everyone! How can I save the state of my Silverlight application in case user pressed back button (or for example pressed on banner inside application) to set the same settings on application resume. Is there anything similar to registry in Windows Phone 7, some local storage? Can I use any database to hold application settings ...

Marketplace in Windows Phone 7 Emulator

I'm just wondering if there is a way to download some apps for the emulator. The thing is that we're about to start our own application and we want to make sure we're doing everything 'Windows Phone 7 Compliant'. I want to go through some apps and see what / how they do stuff; like going to the settings, animations, navigations, etc. Th...

What's the right pattern for creating asyncronous services?

Here's what I'm trying to do: public class EmployeeService { public void GetEmployeesAsyc(Action<IEnumerable<Employees>> callback) { ThreadPool.QueueUserWorkItem(x => { var employees = //...fetch employees ...// callback(employees); }); } } public class ViewModel { private Emplo...

WP7 Frame embedded in a page linking to another page

I have a xaml page that I want to host another xaml page for various reasons. I attempted to use the Frame control, but I ended up with a warning telling me that the default constructor must be public... <controls:PivotItem Header="page1"> <Controls:Frame Source="MyPage.xaml"/> </controls:PivotItem> Okay, well that doesn't work;...

Read files in Windows Phone 7

Hello, I'm trying to open a file in Windows Phone 7, but it says it doesn't exist. Here's the code I'm trying: IsolatedStorageFile file = IsolatedStorageFile.GetUserStoreForApplication(); bool test = file.FileExists("\\ClientBin\\clubs.xml"); And in my project I added a folder called ClientBin, and the clubs.xml is in there. The clubs...

Tips on debugging UI errors in Windows Phone 7

I have a Windows Phone 7 application and I regularly see "weird" UI glitches that take me AGES to debug. It's a range of issues like controls appearing to have extra margin, scrollbars not appearing, animations looking really glitchy, entire page scrolled down, combobox items offset, etc. etc. I'm happy to admit it might be me - but ho...

Changing the PivotItem header template?

By default, the PivotItem's header uses a large font. I was hoping I could change the HeaderTemplate but no such property is available. Is there a workaround? ...

WP7 Disabled Button Style

I am trying to do change the color of a disabled button's border/text. Code: <Style x:Key="TopTabChooserButtonDisabled" TargetType="Button"> <Setter Property="Foreground" Value="Orange" /> </Style> But it doesn't affect the button at all in Silverlight. Does anybody know what will make it change? THanks. ...

WP7-Control to enter numeric data?

I've got a WP7 app where I need to enter large numeric data (6 digits and more) - is there some kind of advanced numeric control to enter large numbers comfortably? ...

MediaPlayer.Play(song) - can't be called twice with the same song?

this is what i have: MediaPlayer.Play(DataFile.AllMusicTitles[0].SongFile); System.Threading.Thread.Sleep(3000); MediaPlayer.Play(DataFile.AllMusicTitles[1].SongFile); System.Threading.Thread.Sleep(3000); MediaPlayer.Play(DataFile.AllMusicTitles[0].SongFile); play s0, sleep, play s1, sleep, then play s0, then 2nd time i pla...

Build thrift dll for use in Windows Phone 7 application

Pretty straight forward question: How do I build a thrift dll for use in a Windows Phone 7 application? ...

How to customise wp7 toolkit ToggleSwitch

I have the WP7 toolkit and am using the toggle switch. At the moment it displays On or Off. I know you can customise it using the the content template and the sample code supplied with the tookit shows just that, but it I can't find a way of changine On/Off to something else. I want to display Yes and No. ...

Dynamic web service request in Windows Phone 7

Hello, I'm trying to dynamically send a SOAP request to different webservices. Each webservice has its own ID, so I just basically have to change the ID of the webservice in the URL, E.G.: http://mywebservice.com/ID/servicedosomething Anyway, I don't know how to do this manually. I can't reference the services because I would have to a...

Is there a way to programmatically quit my App? (Windows Phone 7)

I'm writing a windows phone 7 app. I have "fatal exception" handling code where I know for sure that the app is totally busted and there's no point in continuing. (I'm hoping I never get here...). Since there's nothing more my app can do other than quit I want the user to be able to close the app. But I noticed there is no System.E...

[WPF] Unable to click on a button or write in a textbox when using Pivot control

Hi all, trying to learn to work with the windows phone 7 pivot control, I encounter a strange behaviour. I have this xaml : <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <Canvas Grid.Row="0"> <TextBox Height="78" HorizontalAlignment="Left" Margin="10...

Clipping Paths in Silverlight Mobile (WP7) - I can't create anything but a simple rectangle?

Hello, I'm trying to create clipping paths for shapes, such as circles, polygons, etc. I'm actually trying to make the clipping path follow the line of the shape. I've tried the below in Expression Blend, what am I missing? What I'm really trying to do here is have the user trace shapes with an InkPresenter, and have it error if they've...

Virtualizing Data in Windows Phone 7: An example

In Windows Phone a ListBox support the virtualization of the data, that means it can only load the data needed and not everything. Peter Torr explains the interface you need to implement. The short version is that you have to create both a method that return the position of an element and another one that return the element in a specifi...

Parsing JSON on Windows Phone 7

I'm trying to do some simple JSON manipulation on the Windows Phone 7. JSON.NET looks great, but VS2010 complains when I try to add a reference to it. It let me add the Silverlight dll, but warned me that it could result in weird app behavior, so I'm skeptical that it would actually work. This looks like a fine way to serialize and des...

Affordable options for multi touch desktop device (To test apps on Windows phone 7 emulator)?

I am looking to get into Windows phone 7 development. I am running Windows 7 and i know it supports multi touch which i can then use in the emulator if enabled. Is there any way for me to try this out without me paying a premium for a tablet, phone or touch monitor? Many thanks, Kohan. ...