Julmar Model-View-ViewModel and Core .NET library
Copyright (C) 2008-2014 julmar.com
This library is provided "as-is" with no warranty. It was developed by JulMar Technology, Inc. and is
distributed from www.julmar.com. You are free to utilize the source code (in whole, or in part) or
provided assembly however you desire, including creating derivative works without any compensation or requirements back to JulMar Technology, Inc.. Any questions or comments can be directed to
. This library was intended to be used as a learning and teaching aid, and I hope it has some value to each person who looks at it. -- Mark Smith
There are three versions of the library available:
This supports .NET 4.5, Mono 4.5, Windows Store, Windows Phone (WinPRT), Xamarin.iOS and Xamarin.Android with a Portable Class Library and a set of platform-specific framework DLLs. This is the preferred release as it automatically detects your platform and
installs the right things with Nuget. Install the MVVMHelpers.PCL version for this
WPF (3.5, 4.0 and 4.5)
This version is the older and more complete version which includes a variety of classes for .NET in general as well as MVVM, Behaviors and UI services for WPF.
Windows Store Apps (8.0, 8.1)
This version is newer and is a derivative of the original WPF version. It includes base MVVM support and a port of the Blend behavior system (since that was unavailable at the time).
Initial revision - all basic functionality is present.
1.01: rolled in a bunch of fixes from internal library -- 6/09
Fixed a bug in the event commander which was causing multiple invocations in some cases.
Added support for ShowDialog return results.
Added HelpProvider behavior to support invoking Windows Help
Removed automatic mediator registration from ViewModel - unnecessary perf hit when not using service mediator - you must call RegisterWithMessageMediator() deliberately now.
Added SystemInfo class to retrieve Windows version - can detect difference between W2K8 SP2 and Windows 7 (Environment.OSVersion does not appear to do so).
Added LinearGradientMarkupExtension for easy gradients
Added ENTER/ESC/Fx/CTRL support to NumericTextBoxBehavior.
1.02: additional support 7/09
Added CommandParameter and Command to EventCommander event arguments
Added Past/Drop conversion to NumericTextBoxBehavior
Split out EditingViewModel into implementation class to make it easier to provide other forms of edit support.
Added PropertyObserver<T> from Josh Smith
1.03: Added new Behaviors assembly 7/30
Added dependency to System.Windows.Interactivity.dll
Ported over existing attached behaviors to Blend style behaviors
Added InvokeCommand action to bind to VM ICommands
Added CommandEventTrigger to support EventCommander from Blend
Added Designer.InDesignMode static property to test design surface
Added test for null conditions in VisualTreeHelper extensions
Moved ValidatingViewModel into proper namespace
Added clipboard paste support to the WatermarkedTextBoxBehavior
Changed MTObservableCollection<T> to support true multi-threaded access based on discussion on WPFDisciples list.
Added support for VS2010 Beta 2
Removed ViewModel.OnPropertiesChanged - merged into ViewModel.OnPropertyChanged
Added generic support to MessageMediator
Added BindingTrigger to trigger of ViewModel binding values in Blend
Added CloseWindowBehavior to auto-close a dialog or modaless form without code behind
Added SelectTextOnFocusBehavior to select all text in a TextBox when it receives focus
Added ViewportSynchronizerBehavior to track the ViewPort of a ScrollViewer and bind it to ViewModel properties.
Added Dispatcher transition for RaiseClose and RaiseActivate from VM for cross-thread invocation
Added MultiConverter to aggregate value converters together.
Added ScrollingPreviewBehavior and ScrollBarPreviewBehaviors (replaced ScrollingPreviewService)
Added new behaviors and converters. Synched with private library
First full targeted .NET 4.0 release
Added MEF support to locate services using
Added MEF support to locate ViewModels using
Added MEF support to locate Views using
Cleanup of library to target both .NET 3.5 and .NET 4.0
Added undo/redo framework
Updated PropertyObserver to allow global property notifications
Added ItemsControl drag/drop behavior
Split out Julmar.Core to contain non-WPF specific types.
Moved internal ThreadedCollection into Core
Added ReaderWriterLockSlim extensions and ObjectLock extensions
Official build from rcat.codeplex.com changes
Added attached event support to EventCommander
Corrected issue with MessageMediator identifying interface targets from an implementation message
Added new constructor to ViewModel to avoid MEF registration for 3.5 memory leak issue (MEF)
Added Swap and Move extensions to IList collections
Added option to defer collection change UNDO records into a group for global undo. BeginDefer/EndDefer on CollectionUndoObserver.
Added flag to turn off CommandManager.RequerySuggested if VM wants to handle it directly.
Added lambda version of OnNotifyPropertyChanged per request
Unit tests for above.
Changed MEF resolution code to allow custom catalogs to be used for resolving dependencies.
Added Range class for Parallel programming
Added ListView sorting behavior
Added 2 overrides for IUIVisualizer.Show and ShowDialog to pass object owner for explicit window ownership management (to be used by view, not VM).
Added InDesigner property to ViewModel (just a copy of Designer.InDesignerMode)
Added new overrides for IMessageVisualizer to support icons, window owner, etc.
Allow ExportUIVisualizer to be applied more than once.
Remove IViewModelTrigger and rewrote ViewModelTrigger behavior to target event by name.
Added MultiTreeSelect behavior
Modified MTObservableCollection to support suspension of events
Added ChangeCursorAction to behaviors
Fixed ExportUIVisualizer (removed AllowMultiple as it broke certain resolutions with MEF).
Added StyleInteraction and test project into behaviors project
Added SelectTextAction, MessageBoxAction and AutoDisabledImageBehavior
Fixed a couple of spelling errors in comments.
Enabled DeferredBinder to support 2-way bindings
Added test project for DeferredBinder
Added back in support for multiple ExportUIVisualizer and ExportViewModel attributes
Added test project for multiple export attributes
Removed IDynamicResolver interface, renamed MefComposer to DynamicComposer. You should just use DynamicComposer.Instance as the library is too dependent on MEF to really change the composition model.
Added ListViewColumnAutoSizeBehavior to provide Grid-like column sizing (Auto,*,##)
Added test project for ListViewColumnAutoSizeBehavior
Modified ListViewSortBehavior to correct crash when adorner layer is not present.
Fixed bug in ValidationManager when traversing properties and potentially getting into infinite loop
Added MouseGestureScrollViewerBehavior to support iPad-like gestures with mouse on ScrollViewer elements (with inertia)
Added check in SynchronizedScrollingBehavior to disable scrolling if scrollbar is disabled.
Added ability to turn off drag adorner for ItemsControlDragDropBehavior
Added ServiceReplacement test project + unit tests from blog
Fixes for EditingViewModel, also extended with more interception hooks.
Refactored some of the services to be more inline with the internal metro/Win8 version.
Merged .NET 3.5/4.0 set together
4.20 9/2012 (matches 1.04 of MvvmHelpers/Metro)
Several changes based on work done with MVVMHelpers/Metro.
, just use
and ServiceLocator will find it.
Renamed ServiceProvider to ServiceLocator.
Renamed IServiceProviderEx to IServiceLocator
Removed ViewModel.ServiceProvider - replaced with ServiceLocator.Instance
ServiceLocator is now exported only as IServiceLocator, not IServiceProviderEx
Removed EventCommander - use EventTrigger from Blend
Removed LifetimeEvents - use EventTrigger from Blend
MessageVisualizerOptions is now in JulMar.Windows.UI namespace (was in interfaces)
Changed InvokeCommand to pass parameter from trigger if no CommandParameter is data bound
BREAKING CHANGE: Services are no longer marked with
, you must
any services you want to override. This was done specifically so that you could implement service interfaces without replacing the built-in ones.
Added Windows 8/2012 constants to SystemInfo
Updated ViewModelTrigger to support Action and Action<T> delegates
ViewModelLocator is not public anymore - use IViewModelLocator
New ViewModelLocatorResource can be placed into resources to find VMs if you don't like ViewModelCreator
Added ServiceLocatorResource (from Win8/Metro)
Bug fix for DoubleClickTrigger
Changed version to .NET 4.5
Bug fix to allow "#" in path when loading julmar.wpf.helpers.dll
Updated .NET 3.5, 4.0 and 4.5 versions of library.
Windows Store Apps (Metro)
Initial revision - all basic functionality is present.
Based on Windows 8 CP
Rebuilt for Windows 8 RTM
Ported ViewModelLocator and most of MVVMHelpers 4.10
Ported Blend behavior support
Added NameScopeBinding to allow ElementName binding to attached collection items
Changed InvokeAction to pass trigger parameter if CommandParameter is null.
Fixed a bug in the ViewModelLocator when back-navigation occurs
Removed the public ViewModelLocator breaking change. Use IViewModelLocator interface instead
Added ViewModelLocatorResource for binding in XAML
Added ServiceLocatorResource for binding services in XAML
Added unit tests and new test program
Modified ViewModelTrigger to support Action and Action<T>
Added static Designer class to port WPF code
IViewModelLocator moved to JulMar.Windows.Interfaces (instead of Core)
Added InDesignMode property to SimpleViewModel
Removed dead code from ViewModelLocator
Fixed MessageMediator to properly return true/false when targets have been collected
Changed MessageMediator back to public type so it can be used multiple times
Changed ServiceProvider implementation class from public to internal.
Moved MessageVisualizerOptions to JulMar.Windows.UI (was in interfaces)
Updated some unit tests
Minor bug fixes
Added Flyout control and IFlyoutVisualizer
Integrated StateManager into PageNavigator and abstracted with IStateManager
Added support to locate ViewModels through attached property (still supports dictionary)
Added support to provide custom serialization on a ViewModel by implementing IViewModelStateManagement
Fixes for PageNavigator/StateManager
Expose KnownTypes on IStateManager
Allow persistence even when objects do not participate in INavigateAware
Refactored code to share persistence on suspend + navigation.
Fixes to reattach event handlers from EventTrigger when UIElement is unloaded/loaded multiple times.
Added SynchronizedCollectionBehavior (ported from WPF version)
Added new AutoSerializingPageNavigator
Added support to replace
Fixed bug in PageNavigator.NavigateTo(Type,object) not passing along argument.
Fixed bug in VisualStateUtilities.ShouldContinueTreeWalk - missing test.
Renamed FocusManager to FocusScope to avoid namespace collision with WinRT Xaml type
Added IsWatermarkTextVisible property to WatermarkTextBoxBehavior.