Any Developer working in the XAML Environment must have stumbled across Microsoft Blend, a.k.a. Expression Blend at some time. Blend is a Software aimed to support developers and designers of XAML based UIs create designs and animations, apply behaviors and so forth. As of 2010 (talking VS Versions), Microsoft has made the licensing of Blend a real mess, if you're a WPF Developer: The only way to purchase Blend is buying the entire Expression Studio Ultimate for somewhere around 500 Euros. Smaller development teams are made to bleed unnecessarily, since the VS 2010 XAML editor had serious issues before SP1. We're talking 2012 now - seems MS have learned their lesson: Blend is free for Windows 8 Store Apps and comes along with the correlating Visual Studio Express Edition. But what about WPF or the already zombified Silverlight? Good news first: Blend will continue to support WPF. But what are the licensing terms? Looking things up on the Blend Insider Blog , I fo...
VSIX files have version numbers and can be maintained via the menu Tools->Extensions and Updates Sometimes you encounter VSIX files Download VSIX installer rename VSIX to ZIP Extract extension.vsixmanifest from the ZIP and open in any editor. Change the SupportedProducts section to match the snippet below Update the file (drag into the zip and confirm overwrite) rename back to VSIX <SupportedProducts> <VisualStudio Version="10.0"> <Edition>Ultimate</Edition> <Edition>Premium</Edition> <Edition>Pro</Edition> </VisualStudio> <VisualStudio Version="11.0"> <Edition>Ultimate</Edition> <Edition>Premium</Edition> <Edition>Pro</Edition> </VisualStudio> </SupportedProducts> Th...
Sometimes it may happen that you have to set property values on objects depending on whether they exist or not. I though this was feasible using interfaces, but objects can only be checked against contracted interfaces (i.e. such interfaces that occur in the object's class hierarchy), so this is no good here. An easy way to achieve this is the type.GetProperty() and type.GetProperty().SetValue() methods, as explained below. PropertyInfo pi = obj.GetType().GetProperty("Enabled"); bool enablable = (pi != null && pi.PropertyType.Equals(typeof(bool))); if (enablable) { obj.GetType().GetProperty( "Enabled" ).SetValue( obj, true, null ); } The very same thing can also be done with events, methods, fields, nested classes etc. See the following example for an event handler implementation: EventInfo ei = obj.GetType().GetEvent("Paint"); bool paintable = (ei != null); if (paintable) { PaintEventHandler pe = _Paint; obj.GetType().GetEvent("P...
Kommentare
Kommentar veröffentlichen