A nice and flexible way to introduce filtering and sorting on a view model data collection is to use a CollectionViewSource. Here’s a quick example: Starting with a bound collection property like this… public ObservableCollection<Item> Items…
wp7 record your own accelerometer data for testing
In the recent Mango developer tools for Windows Phone the device emulator has been updated to include an accelerometer simulation screen. This enables passing data in real time to your application via the Accelerometer. Also, you can play…
wp7 pathlistbox
Since the new Mango developer tools were just released I wanted to write a quick post on PathListBox since I have been looking for an excuse to give it a try. PathListBox allows layout of list box items along an…
kinect drums
Whilst exploring the possibilities opened by the Kinect device I made a demo using the OpenNI framework http://www.openni.org/ with PrimeSense NITE components. [youtube=http://www.youtube.com/watch?v=9b3Z4aT-kqk&w=448&h=252&hd=1] Kinect Drums As you can see from the video it allows tracking of multiple ‘players’. I…
OpenNI + Kinect (getting set up on Windows)
I have recently been hacking around with a kinect camera + OpenNI + PrimeSense NITE components and initially it was quite challenging to get the software bits and pieces installed correctly. I got it working but then needed…
WP7 UserControls
by Peter Daukintis Since silverlight 2 we have had the concept of the UserControl which provides a simple way to compose a re-usable part of our user interface. This allows multiple uses of the same ui across an application which…
Simple textbox validation wp7
Since wp7 is based on Silverlight 3 then input validation can be done (love or loathe it) via exceptions. Here’s a simple example… <Grid x:Name="ContentPanel" Grid.Row="1"> <Border x:Name="errorBorder" Background="Red" Opacity="0"></Border> <TextBox Margin="8" Text="{Binding MyText, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}" BindingValidationError="ContentPanel_BindingValidationError"> <TextBox.InputScope> <InputScope>…
MS translator api text to speech WP7
I’ve been messing around around with the ms translator api (http://msdn.microsoft.com/en-us/library/ff512435.aspx) and thought I’d post my sample code. http://cid-4f1b7368284539e5.office.live.com/self.aspx/.Public/Wp7%20Speech%20To%20Text/TextToSpeech.zip A quick app that speaks with a localized French accent.
databinding BingMaps Control Wp7 MVVM
Ok, so a similar treatment for the Bing Maps control as for previous posts on the Pivot and Panorama controls. So starting out with a standard Windows Phone Application project… Straight into the xaml: <Maps:Map x:Name="map" Grid.Row="1"> <Maps:MapItemsControl ItemsSource="{Binding PushPins}">…