Mike Taulty's Blog
Bits and Bytes from Microsoft UK

June 2009 - Mike Taulty's Blog

Blogs

Mike Taulty's Blog

Elsewhere

  • Upgrading Community Server 2.1 to 2008.5 Service Pack 1

    I’ve been a bit stuck with blog engines. I run Community Server and have done for a long time and, during that time, the product’s become very big and very rich and I only use about 10% of what it does. I just want a blog engine. I was recently considering what to do about this as I’ve been getting behind on Community Server versions. I tried Graffiti CMS which looks to be a fork of Community Server designed for people like me who just want the blog engine bits but, frankly, whilst the UI looked great and it seemed so much simpler than Community Server I found that the migration process from Community Server didn’t really work for me and I was also left wondering whether the product was very “alive” as there’s quite a bit of discussion out there about it dying off and my questions to the forums went unanswered. So, I returned to Community Server and decided that it was time to upgrade to the latest and greatest and I thought I’d blog my experiences for anyone else that has the same situation. Firstly, let me explain...
    Filed under:
  • Windows 7: Experimenting with Multi-Touch on Windows 7 ( Part 2 )

    Following on from my previous post and remembering that I’m just playing around here and there are better resources up at; http://code.msdn.microsoft.com/WindowsTouch which will lead you to a full, sample interop library wrapper. I wanted to carry on a little with my experiment though and move up into the world of touch gestures. This seemed easier as it turns out to be the default and there’s no need to call RegisterTouchWindow if you just want WM_GESTURE messages so that’s nice and I changed my test harness and code behind it to reflect that. You can also use SetGestureConfig and GetGestureConfig in order to control what gestures you’re interested in for a particular Window and so I wrote a bit of code around that ( again, dropping to C++/CLI to do that ) – not entirely sure that this is correct at this point, mind but here’s the header file; namespace NativeCodeHelpers { public enum class GestureType { Zoom = 3, Pan = 4, Rotate = 5, TwoFingerTap = 6, PressAndTap = 7 }; } namespace NativeCodeHelpers { [Flags...
    Filed under: ,
  • Windows 7: Experimenting with Multi-Touch on Windows 7 ( Part 1 )

    I was down in the Microsoft Technology Centre at Reading the other week where I got a chance to take a look at a piece of proof-of-concept work that one of our customers is doing around using touch in Windows 7 to improve the user experience of one of their applications. ( I’ve captured this on video and will share at a later point as I’m not able to just at the moment ). But this got me thinking about Multi-Touch in Windows 7 and wondering how easy/hard it is. I’ve done some work with the Tablet PC in my time and that wasn’t too tricky and I gave an example of that at DevDays the other week in that I used a simple WPF application that handles basic ink gestures; and that’s just using a WPF InkCanvas with its gesture mode set to GestureOnly and a little code behind it ( download the source here if you like ). So, that was easy enough but what about Multi-Touch? Well, the first “problem” I have is that I don’t have any multi-touch-enabled hardware. I’ve seen 2 multi-touch-enabled machines, the HP TouchSmart; and...
    Filed under: ,
  • Video Catch-Up: Trip reports from DevDays Holland and NxtGenUG Fest 09

    I dropped a couple of videos to YouTube around recent trips that I’ve made. A couple of weeks ago I was at DevDays Holland delivering some sessions around Silverlight 3 and WPF and I captured a bit of video with the intention of giving people a flavour of what that conference looks like and also some of the “speaker experience” of turning up, finding the session room and setting up kit and so on; if you’re in the UK and you’ve never considered DevDays then it’s worth a look at because I think it works out cheaper than some other European conferences and even conferences in London and the atmosphere is great, the speakers are great and a lot of it happens in English. Then, just last Friday, I was down at the NxtGen User Group’s “Fest 09” un-conference down at Microsoft Research in Cambridge and I captured a bit of footage from that one as well; Enjoy.
    Filed under:
  • Speaking at MIX Essentials, Dublin, 24th June

    Just a quick plug – I’ll be doing some sessions on Silverlight 3 at MIX Essentials in Dublin on the 24th June. Click the picture above to jump to the site where you can register. It’s an all day event with 2 tracks running concurrently and I like the strap-line that says “ Completely Free” :-) Maybe see you there…
    Filed under: , ,
  • WCF, Type Names and BehaviorExtensionElement

    This is one purely for a search engine. If you’re ever looking at WCF and adding a BehaviorExtensionElement in order to add custom behaviors then take care if you see an error message like; "Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions" It looks like a bug ( see report here and here ) in that if you use a typename like this in your config file; <extensions>   <behaviorExtensions>     <add name="clientInterception"          type="ProductsApplication.MyInspector,ProductsApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>   </behaviorExtensions> </extensions> then you’ll see a failure whereas if you use one like this; <extensions>   <behaviorExtensions>     <add name="clientInterception"          type="ProductsApplication...
    Filed under: ,
  • Silverlight: Product Maintenance Application ( Part 6 – Porting to WPF )

    Following on from this post . As expected, porting my Utilities library to WPF wasn’t too difficult. It was a matter of creating a WPFUtilities class library, adding the existing source from Utilities as linked code files and then referencing PresentationCore and PresentationFramework and hitting build. then again, there were only a couple of very basic classes in there so it’s not too surprising. Next, I thought I’d try and port my Security project and so created another Class Library project WPFSecurity and added the existing source files as linked files again. This project though is a bit more complex in that it has 2 sets of WCF service references in order to call the Authentication and Role services made available by ASP.NET. I need to add service references to my WPFSecurity project and try and ensure as few code changes as possible by doing that. In adding the references, I made sure to use the same proxy namespace names; and also all references in Silverlight are asynchronous and so my...
    Filed under: , ,
  • Silverlight: Product Maintenance Application ( Part 5 – Running the app and thinking about WPF )

    Following on from my previous post it’s time to run up the app ( it’s not exactly a visual feast :-) ) and experiment a little with it. I can log in as my user ursula ; and she’s presented with “the UI” ( the graph should probably be hidden for users that are not in the viewers role but I’ve left it for now ); and then she can search for some data; and get back a bunch of paged data; and then navigate through it; because she’s neither a viewer or editor that’s all she can do and the grid is read-only and the Insert button and the View button on each row of data are disabled. If I log in as veronica who’s both a user and a viewer then the view button is enabled and I can bring up the sales history chart data; and then, finally, if I log in as eric who’s both a user and an editor then the grid becomes enabled as does the Insert button and the Save Changes button (as/when we make any changes) and so I can alter data and submit changes and so on; and that...
    Filed under: , ,
  • Silverlight: Product Maintenance Application ( Part 4 – Adding some controls )

    Following up on this post I thought the first control I’d build would be a graph control so I just referenced the Silverlight Toolkit for its graphs and very quickly had; <UserControl x:Class="SilverlightApplication6.Controls.ChartDisplayControl" xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml" xmlns:charts="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit" xmlns:localCtl="clr-namespace:SilverlightApplication6.Controls"> <Grid x:Name="LayoutRoot"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <StackPanel Orientation="Horizontal"> <TextBlock Text="Historical sales data for product" /> <TextBlock Margin="5,0,0,0" Text="{Binding ProductName...
    Filed under: , ,
  • Silverlight: Product Maintenance Application ( Part 3 – Getting some data )

    Following up on this previous post I wanted to start building out some classes that managed data for me “in front” of the services I’d built. I figured that I needed data for my chart, data for my products and reference data and so I sketched out a “DataModel” class; public class DataModel : PropertyChangeNotifier { public DataModel() { salesChartData = new ChartData (); referenceData = new ReferenceData (); productData = new ProductData (); } public ChartData SalesChartData { get { return (salesChartData); } } public ReferenceData ReferenceData { get { return (referenceData); } } public ProductData ProductData { get { return (productData); } } ChartData salesChartData; ReferenceData referenceData; ProductData productData; } and I want to provide this ( or pieces of it such as DataModel.SalesChartData to various controls throughout the app so that they can data-bind to it ). There seemed to be a bit of commonality in the various classes I wanted to write in that each of them does...
    Filed under: , ,
  • Silverlight: Product Maintenance Application ( Part 2 – Building some web services )

    Following up from this post , I set about building some services to power my application’s data requirements. These aren’t perfect by any means but they’re enough for a sample application to get going with. Working from the sketch of how the services need to look given at the end of the previous post , I put together a LINQ to SQL diagram; and left LINQ to SQL to do concurrency checking based on every column in the Product table ( I only plan to modify the Product table ) which is its default if I remember correctly ( and, usually, overkill but it’ll do for me here ). And I then produced a rough service interface; public class L o o k u p D a t a I t e m { public int I d { get ; set ; } public string T i t l e { get ; set ; } } public class P r o d u c t S a l e s { public string M o n t h Y e a r L a b e l { get ; set ; } public decimal T o t a l S a l e s { get ; set ; } } public class P r o d u c t S e a r c h R e s u l t { public int P a g e { get ; set ; } public int T o t a l P a...
    Filed under: , ,
  • Silverlight: Product Maintenance Application ( Part 1 – Authentication, Roles and Logging In )

    I wanted to try and follow up on this idea of the XAML Continuum and the basic example that I did with Silverlight and WPF versions of the Pong game by doing something that looked a bit more like a business application. I figured that I’d take my trusty Northwind database and build some kind of functionality that let you maintain the Products table. Specifically; Display a grid with data from the Products table allowing CRUD against that table. Well, perhaps not CRUD because I don’t think the Products table is meant to support deletes (there’s a discontinued flag) and so maybe I’ll just do CRU rather than CRUD. Allow for searching against products. Allow for paging of the product data. Display appropriate lookups for the related entities – Supplier and Category. For a particular product, display a graph showing sales of that product over time. Have user roles that allow for users to be able to [View], [Update] and [See Sales Data]. Pass all data over a secure transport to avoid prying...
    Filed under: , ,
  • Silverlight 3 Session at NxtGen Fest 09, Microsoft Research Cambridge

    I was at the NxtGen Fest 09 event in Cambrdige today talking about Silverlight 3. A truly fantastic day with a cracking start from Professor Chris Bishop of Royal Institute Christmas lectures fame;   who was talking about 3rd generation artificial intelligence technologies. There were other great sessions from Dinis Cruz, Chris Hay amongst others. By contrast to Chris’ talk, my talk was the fairly mundane topic of; I had an interesting problem with a demo where a Silverlight client was calling a web service and I was serving up that service from Cassini and the project had been left to use dynamic ports ( by mistake ) and the port changed during the demo and the client couldn’t find the server. Truly foxed me but I took the British route of; and tried to fix it with the debugger before giving up and moving on so hopefully ( if you came along ) your enjoyment was improved by seeing me wrestling with Visual Studio rather than reduced by it :-) The slides from the talk are here for download and all the demos...
  • WPF and Silverlight Difference Whitepaper

    Wintellect have published this whitepaper on CodePlex on the differences between WPF and Silverlight. I haven’t read it all myself yet as it’s reasonably meaty but from what I’ve seen it’s a very valuable resource to have to hand if you’re working with both environments. Some of the items in the paper are illustrated by demos from my “Beyond Silverlight with WPF” talk at DevDays Holland the other week – you can find the materials here . It’s a difficult time to be writing a paper like this because Silverlight 3 is in beta and so there are various places in the doc where forthcoming functionality is highlighted with text like “This is a current WPF/Silverlight difference but will change in Silverlight 3”. Hopefully people will grab the document, download it and feedback and make it an even better resource.
    Filed under: , ,
  • Building a Viewbox-like control

    I found myself reading this post today as I wanted to build a Silverlight control which is a little like Viewbox in that it has ( let’s say ) a single lump of content that it wants to display and I was struggling to find the right base class for it. Why? Because in WPF there are methods like AddLogicalChild on FrameworkElement whereas in Silverlight you don’t have this so you have to look for a control to sub-class which already has some notion of content ( like ContentControl perhaps :-) ). Anyway, it’s an interesting read to see how Viewbox had to function a particular way when implemented by the Silverlight Toolkit team and ( if you look at the beta bits for Silverlight 3 ) you’ll find that it now works as you’d expect especially when you write XAML like; <controls:Viewbox>             <TextBlock                 x:Name="xyz" />        ...
    Filed under:
1 2 Next >