I uploaded the latest version of Stripes (1.3) to the Marketplace last night. This version brings a few improvements, including:
Right now, I am constrained by the very limited camera API on all Windows Phone devices. Microsoft has promised regular updates to the platform and I am hopefull that direct camera access will become available in a future release. However, until then, a "live" barcode scanner (one in which the video from the camera is examined until a barcode is found) is impossible. Also, there is no way to modify the camera settings or save them for future use, either. Believe me when I say I am anxiously awaiting an update to this particular API. Are you listening, Microsoft?
Microsoft officially luanched its new smartphone brand "Windows Phone" today. While I usually don't re-blog / link-blog I do want to mark the occasion and I can't really add much to the following content:
I had a great time speaking at the “Super Laptop Meeting” last night. My 20-minute talk was “Best Practices for Custom WF Activities.” I even won the grand prize, so thanks to all of you that voted for me!
If you are interested in the slides and the demo I showed, you can download them by clicking here. If you want to know more about the Lincoln .NET Users Group, you can do so at http://www.lincolndev.net
If you are even a little bit familiar with the Model-View-View Model pattern and its implementation in WPF, you have probably run into the ItemsControl control. Actually, even if you haven’t used MVVM, you may have used it. Somewhat like the Repeater control in ASP.NET, this control allows you to bind to a data source and do something in XAML for each of the items in that data source. In any case, let’s play around with the ItemsControl element in WPF a little bit.
Recently, I was writing a report that selected some data out of a normalized SQL Server database. For one of the queries, I needed a “flattened” form of the rows in one of the tables. In essence, what I needed to do was turn several rows of data into a single column.
I recently ran into a situation that has come up plenty of times for plenty of people. I had an array of integers and I needed to figure out if any of the numbers were in the array more than once.
A variety of solutions ran through my head: sorting, looping, searching, etc. However, LINQ seemed like the most elegant solution. Here’s what I finally settled on:
Last night at the Lincoln .NET User’s Group, we had our second laptop meeting. A few people brought some code, a dev tip, or a fully working program to demo. I choose to show my "100 Line Web Server" I created to perform some unit testing on an app that was HTTP-centric, lately.
So, here is the entire program. I hope it’s useful to some and at least interesting to most.
If you need to read command-line parameters within your WPF application, your first inclination (if you are like me) might be to go looking for the Main method. Of course, you won't find a "Main" method in a WPF application. Instead, start looking at the App.xaml file.
By the way, for the rest of this post, I'll presume you will be using command line switches like the following:
In my previous post about creating a bitmap from an InkCanvas in WPF, I mentioned that you could easily save the ink strokes for later. I wanted to post a code example for writing those strokes to a database and de-serialized them back into memory.
The first step in saving to a database is to get an array of bytes from the strokes in the InkCanvas. To do this, the StrokeCollection provides a convenient Save method:
An example message that I saw coming back from the application looked like this: