Did you ever wonder what
might be a nice and basic skeleton of a simple WPF
application?
Did you ever have that
desire to find a basic WPF project, that you could use as a reference
if you ever forgot something?
Did you ever have that
feeling, when working for several months, or maybe years, with a
technology, then switching to another one for some time (completely
different), and returning to the previous one, that you are
technologically lost even in the most simple things?
I can say for sure that I
did, and because of this, I propose to you a solution that I've built
for several years, for myself, based on my experience on small but
live projects.
The history started several
years ago, when I needed to work on WPF projects, then switching to
something else, then coming back and not remembering how to do
things, and AGAIN searching the WEB, the stackoverflow, finding
solutions and wasting valuable time.
One day, I've said to
myself: that must stop! I need to gather all information I need,
create a simple reference project for myself, and when I don't know
something, I just open it, and look how I've done something before.
Now, I think, has come the
time to share this little project with others.
It does not contain
everything though, but most basic ideas, and I will be grateful for
any comment/suggestion that you'll might have.
The solution was re-created
for Visual Studio 2013, and contains the following projects:
WPF_MVVM contains the main window.
XMightCommon contains all
generic non UI code, that can be reused in many projects.
XMightUICommon contains all
generic UI code, that can be reused in many projects.
Topics covered in the
solution:
- Creation of a WPF window
- ViewModel
- Binding
- RelayCommand
- UserControl with INotifyPropertyChanged
- Dependency Properties
- Resource dictionaries
- Animation
- Resources
- Control Templates
- Converters
- Custom StartupUri
- Busy/Loading animation while executing action.
- Logging to UI console
- log4net
- RollingFileAppender
I wish this project to be
useful to you and if you find it useful, I will be grateful for any
acknowledgement!