As of 2011, I have ten years experience in various technologies as C#, WPF, Java, J2EE, C++. For the past three years, I have been extensively working on various .net and java technologies including but not limited to WPF , C# , WCF and composite application guidance (Prism ).
There is a newer release of Resharper, version 4.5 available. If you haven’t put your hands on it, I suggest you do. I could see a lot of improvements compared to the previous versions (especially performance). All licenses purchased after Dec 21, 2007 qualify for a free upgrade to ver. 4.5. According to their website these are some of the new developments.
§ Performance and memory consumption: When working on large solutions, you’ll feel a great deal of difference between ReSharper 4.0 and 4.5.
§ New solution-wide warnings and suggestions: Analyze usage of non-private types and type members within your whole solution.
§ Visual Basic 9 support: ReSharper’s cross-language refactorings and editing experience enhancements now provide support for VB9 code.
§ Extended setup for naming conventions, which are now supported by all ReSharper features.
§ New Inline Field refactoring and enhancements in existing refactorings.
§ Go to Implementation: Go from usage of a class or method straight to its end implementation, bypassing abstract classes and/or interfaces.
If you would like to see a quick demo of all the features, here they are... If you like it and would like to download the new 4.5 release follow this linky. Here is the 4.5 feature map.
If you are updating your Resharper.. Please copy your user name and license key on a notepad as a backup. Happy Coding,
Most of the credit for this post goes truly to Knom who created the initial versions of Visual studio templates. I have been using them for a while, though I always felt that it is broken or incomplete, so here is the newer version.
RELEASE NOTES
The revisions in this modification are
a) The new version works only with February 2009 Composite Application Guidance. It refers to the IModuleCatalog introduced in this release.
b)The references like Microsoft.Practices.composite broken in the previous release are fixed now!
c) The new dlls like Microsoft.Practices.composite.presentation.dll are referred instead of Microsoft.Practices.composite.wpf.dll
d) Namespaces in view and presentation models are fixed in this release.
e) every module can have its own name and the same with ModuleController.
f) Unnecessary imports have been removed.
g) Slicker interface.
If you like this, please goto knom's page and contribute. I dont need any! (may be a comment if it is useful to you !) You can completely write a Prism application in less than ten minutes using this application.
INSTALLATION NOTES
a) If you have not installed Composite Application Guidance, install it here.
b) Download the Visual studio templates for composite application Binaries here.
c) Unzip this and you will find three files.
* install.bat does all the work to setup the templates (run the .VSI and add the .DLL to the global assembly cache)
* CompositeTemplateWizards.dll contains the Wizards used from the project templates. This assembly must be installed into the GAC.
* Templates.vsi is VSI installer package with all the templates (need the wizard assembly in the GAC).
d) Run the install.bat
Upgrade If you are upgrading from knoms templates then just follow the same instructions and when installing, it would ask you for a over ride. Do override the old files!
Trouble shooting Notes a) If you have more than two versions of Visual studio you might not be able to see these templates when you click "new project". In that case
Goto Programs> Microsoft VS 2008> Visual studio tools \ Visual studio 2008 command prompt
In here change your directory to the base directory where you have the install, run the following command.
gacutil.exe -i CompositeTemplateWizards.dll
Restart vs 2008 and things should start working
b) After installing the "composite application guidance 2.0" Visual studio 2008 templates, as a one time activity create a libraries folder with following libraries.
This folder will be useful in creating the Prism apps.
We implement Composite application guidance (Prism v2) in our application. Recently we wanted to run animations when something changes in ViewModel. The Viewmodel changes should initiate storyboards or run functions on view.xaml code behind.
I implemented a class ViewModelChangeDispatcher which can be useful to run animations. You can instantiate this lightweight class from xaml as
OnSourceChangedStartStoryboard="XXXStoryBoard" />
The above VMCD is bound to Source xxxAnimation, this when changed will automatically call the storyboard...
If you want to manage multiple animations using the same, u can handle that by this code
When source is changed the event handler RunAnimation is called.
Anyway here is how I implemented ViewModelChangeDispatcher.
public class ViewModelChangeDispatcher : FrameworkElement { #region Data
public static readonly DependencyProperty SourceProperty; public static readonly DependencyProperty OnSourceChangedStartStoryboardProperty;
// The routed event public static RoutedEvent SourceChangedEvent;
ViewModelChangeDispatcher vmcd = d as ViewModelChangeDispatcher; if (vmcd == null) return;
vmcd.RaiseEvent(new RoutedEventArgs(SourceChangedEvent, vmcd)); if (vmcd.OnSourceChangedStartStoryboard == null) return; vmcd.OnSourceChangedStartStoryboard.Begin(); }
#endregion
#region constructor and members public ViewModelChangeDispatcher() { this.Visibility = Visibility.Collapsed; this.Width = 0; this.Height = 0;
}
/* * Source is always string. * It is the onus of the markupextension to convert it to a string. * * */ public String Source { get { return (String)GetValue(SourceProperty); } set { SetValue(SourceProperty, value); } }
Coming from a Java web development world, I always love the ease of use of apache commons logging, I recently implemented logging in our WPF application based on Composite Application guidance (CAL or Prism v2). We use the Microsoft way of logging, Enterprise Library 4.1. Though the performance is sluggish compared to log4net, we wanted to use this for various other reasons.
This blog entry would help you set up you CAL with enterprise logging. I created a class called CustomLogger. CustomLogger encapsulates Logger. You can either resolve ICustumLogger or ILoggerFacade to use this. ICustomLogger provides interface common to Apache commons logging and ILoggerFacade provides interface common to Enterprise Logging.
First looking at registering the ILoggerFacade. The BootStrapper overrides LoggerFacade to return the customLogger.
internal class Bootstrapper : UnityBootstrapper
{
// CustomLogger is a custom logger implementation.
CustomLogger logger= new CustomLogger();
We register two things with the container, the ILoggerFacade and the ICustomLogger. Though there is a mere small additional cost,the benefit of this is huge, ILoggerFacade is used by the CAL to log things in trace.log and ICutomLogger is used by app to log things.
Writing a WPF application often requires communicating with Server. When the WPF application requires to contact with server, we would like to show a neat animation on the UI like Internet explorer.
This listing shows a way to create an userControl which can be used in applications like
Path is the union of two circles. The important things in path are the rendertransform origin which translates the origin to the corresponding value, i typically define rendertransform and add all children even if i dont use to keep code extensible. Path fill is the color in the circular path which is filled .