windows-phone-7

Binding the IsEnabled property to whether a text block has data

I'm using silverlight for windows phone and I want to bind the IsEnabled property of a button to whether a textblock has text in it or not. In other words, I want my button to be enabled when the textblock's Text is not empty and disabled otherwise. Is it possible to do this purely in XAML using Styles/Setters/Triggers or any other mech...

Windows Phone 7 CTP Refresh to Beta Build Conversion

EDIT: I modified the question title after understanding the actual problem. I tried to run the sample RSS reader from Codeplex. I tried it on CTP version of the Windows Phone Developer Tools and it worked ok on that. But now after trying it on beta version of the tools, it gave me following error. The type or namespace name '...

Can you use WCF services with Windows Phone 7?

I've only been able to find a couple of people online mentioning this, and it seems to be as simple for them as adding the service reference. However, when I attempt to add a service reference for my WCF service (which works correctly in a regular console app, so I have ruled the WCF out as the problem) I receive a host of errors. War...

Implementing a simple XML based Scripting Language for an XNA Game

Hello, I'm working with a team on a RPG engine in C# and XNA. We're planning on targeting Windows and Windows Phone 7, but are running into issues with AI interactions and controlling player actions during cutscenes. FOr the most part, everything is extracted using the MVC design pattern, but abstracting all logic and movement into a con...

How do I include XML data in a Windows Phone xap deployment?

I'm working on a WP7 app. The app will have a couple of XML files. Some are read-write, a couple are read-only. What are my options here? IsolatedStorage? Embedding as resources? I'll also need to know... How would I load the XML into XElements from either? How would I save from an XElement into either? ...

How can I toggle an Image's visibility in a ListBox' ItemTemplate based on SelectedItem

I have an Image inside an ItemTemplate for a ListBox. Is there a way in XAML to toggle its visibility based on the ListBox' SelectedItem? In other words, I want the image to be visible only if the ListBoxItem is selected, but want to avoid code-behind for that. Thanks. ...

How do I hook an event to a control that comes in dynamically as part of a DataTemplate?

I have a ListBox that uses DataTemplateSelector to dynamically decide what template to use based on the type of the item in the list. I now want to hook the events that could be fired by controls within the DataTemplate. For example, if one of the templates has a checkbox in it, I want the application using the control to be notified ...

Impossible to select multiple items from the listbox in a windows phone 7 application.

How can I select multiple items from the listbox in a windows phone 7 application? e.g listboxName.SelectedIndex = 0; listboxName.SelectedIndex = 1; listboxName.SelectedIndex = 2; The above code selects 2 while I need to select all three of those. The values I need to preselect are given to me in a array like {true,true,true,false,fa...

Which Windows Phone 7 emulator is new?

I just now installed Windows Phone 7 Developer tools Beta. I noticed that the icons on the emulator differ from the icons in the web site, demos, samples etc. Mine looks like this; But other uses a different emulator like this; Why is that? which one is real? or latest? ...

Convert windows phone 7 proj to win mobile 6.5?

Did someone try to convert a windows phone 7 project written in c# to an application that's working on a windows mobile 6.5 . The question is: Are there some special libraries (for "painting the screen") that won't work with the win mobile CF ? The only thing I know, that the application written in c# for win phone 7 is compiled in som...

RaisePropertyChanged from within Register

I'm having a problem getting the RaisedPropertyChanged to work from inside a Messenger registration action in my Windows Phone 7 app. Am I missing something? Messenger.Default.Register<NotificationMessage<IList<TouchPoint>>>(this, message => { MyList.Add(new ListItem ...

What are the top 10 gotchas of Silverlight on Windows Phone 7?

I have been using Silverlight for quite a bit and am learning Windows Phone 7. Of course, this is very similar. However, what are the top issues to watch out for? ...

Prism 4.0 compatible with WP7 (windows phone 7)?

Hi there, Does anyone know if the latest drop (i beleive its 6) of prism v4.0 is compatible with WP7? Actually really all i am interested in currently is the MVVM implementation / support that comes with prism 4.0 ... So would this be compatible with WP7? Any help really appreciated ...

Bind to a sorted ObservableCollection<T> in a ListBox

I have a list of data objects in my Windows Phone 7 application called MyObjectList which inherits ObservableCollection<MyObject>. I keep the list in memory in a public property of App called MyObjects. My goal is to bind the data to a ListBox and have it sorted by MyObject.Name. Currently, I have a ListBox in XAML with the name MyObj...

WP7 ListBox Items to fill the width of the ListBox

Hi All, I am trying to get the Items in a ListBox to span the entire width of the ListBox. I have found several posts dealing with HorizontalContentAlignment="Stretch" but I have not been able to get it to work in my WP7 app. Here is my ListBox: <ListBox Margin="8" HorizontalContentAlignment="Stretch" ItemsSource="{Binding...

Post with WebRequest windows 7 phone

I am trying to post to google so I can log into Google Reader and download subscription list, but I am unable to find a way to post to google in the windows 7 phone sdk, does anyone have an example on how to do this? *Edit: Sorry wasn't very clear I am trying use the POST method, to submit an email and password to google login and retri...

ListBox ItemsSource Binding doesn't work

Hello. I'm developing a Windows Phome application. I have the following ListBox on a page: <ListBox Margin="10,10,8,8" x:Name="WallList"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate> <Grid x:Name="ListBoxItemLayou...

Can i use silverlight 3 or 4 dll in my windows 7 application

Would an application built using a siverlight 3 or silverlight 4 dll be allowed into the market place? ...

How to save BitmapImage / WriteableBitmap in png format (Silverlight/windows phone)?

How can i save an image (BitmapImage / WriteableBitmap) in png format using Silverlight for windows phone? ...

DataBound ListBox and Button inside a ScrollViewer/StackPanel construct, with Button appearing below end of ListBox content.

I have the following construct, which shows a DataBound ListBox and a Button inside a StackPanel, which again is placed inside a ScrollViewer: <ScrollViewer VerticalScrollBarVisibility="Visible" Height="400"> <StackPanel Orientation="Vertical" MaxHeight="400"> <ListBox x:Name...