Disabling or hiding the minimize, maximize or close button of a WPF window

Magnus Montin

There may be situations when you want to hide or disable the minimize, maximize, or close button of a window without having to modify the style of the window in any other way. In a Windows Forms application there are the MinimizeBox and MaximizeBox boolean properties that lets you disable the minimize and maximize button of a Form respecively or hide them both (setting both of these properties to false will effectively hide both these buttons):


In WPF you can indeed set the WindowStyle property of a Window to System.Windows.WindowStyle.ToolWindow to get rid of the minimize and maximize buttons completely, but the window will then look slightly different compared to when the property is set to its default value of SingleBorderWindow.


You can in fact also disable the minimize button by setting the ResizeMode property of the window to CanMinimize but this will prevent the user from being…

View original post 919 more words

WCF and SOA: Helpful Info Sources

.NET, Silverlight, and Prism

For 4 1/2 of the 7 months during November 2012 and May 2013, I worked full time doing a deep dive into Service Oriented Architecture using WCF 4.5.  The other 2 1/2 months I spent programming select topics in WPF, MEF, and Dependency Injection in .NET 4.5.  All this was driven by my passion for building extensible apps, plus my long standing interest in cost effective software structure and architecture. 

Two months were spent attending the IDesign Architect Master Class and Architects Clinic, each a week long, to learn the best practices for architecting robust, extensible, scalable Service Oriented apps with WCF.  Then I spent 2 1/2 months writing code to implement this architecture using the following IDesign patterns: 

  • WCF Service as a Manager, Engine, or Resource Accessor (You’ll have to find about these on your own.  Not enough space here.)
  • Queued Pub/Sub Pattern – Facilitates a WCF service…

View original post 801 more words

Customize a slider in WPF, Step by Step Tutorial

Naveen's Weblog

Today let us explore how to customize a slider control in WPF. I have seen a lot of explanation and looked many articles on net about the slider, but i got the the better idea about it only when I implemented it in my own way.
Let me share the same step by step method with you all.

Download Source (7.8 Kb)

So lets begin, First create a WpfApplication in VS2008 and insert a slider control in the grid layout.Open the designer and click on the XAML view. You will see the below code.

Now lets apply style to the thumb and name it as CustomThumbForSlider, below is the implementation.


Great, i.e The important thing that makes the slider control is the IncreaseRepeatButton and DecreaseRepeatButton, when clicked on ends they decrease in the size to the amount of the Tickbar value making the other button grow in size and…

View original post 311 more words

Team Dynamics!


Team dynamics play a large part in the success or failure of a project. Often time’s group dynamics play a bigger part than the collective skill set of a team. In my tenure as a software developer, I have had the opportunity to work on teams that have had both good dynamics and nasty dynamics. And as you may have guessed, the experiences are very, very different. A team that works well together and collaborates is far more motivated, excited, and concerned with the overall quality of the end product. Sadly, the opposite is true of the team with lousy dynamics. Team members will isolate themselves, quality will decrease exponentially, and team members simply stop caring because they are frustrated. At the end of the day, your chances of success in a situation like this are essentially, well… 0.

So, with team dynamics fresh in our minds, I thought it would be…

View original post 801 more words

Attached Behaviors & MVVM

Nish Anil

When you think of MVVM and other patterns involved, it is often about separation of concerns as much as possible, unit testability and code maintainability. These type of patterns help in high quality of code and efficient development of business functionality. If you are new to MVVM then you may want to check out some of the articles by various intellects like Josh Smith, Laurent Bugnion and few others from XAML Disciples group(or just GoogleSmile).

There are lot many frameworks on MVVM out there and to be frank there isn’t any right or the wrong one. You need to evaluate and decide on the one that fits your need! Most often people land up writing one on their own and in a way it is good!

I personally like a framework written by Brette Esterbrooks because it is a skeleton of code that you need and helps you…

View original post 974 more words

Invoke Command when TreeViewItem is Expanded (WPF/MVVM)


To get this working, you can use an attached behaviour, and you’ll see that it’s a clean MVVM strategy.

Create a WPF app and add this Xaml…

Then create a View Model like this…

I use the Relay Command, but you can use the Delegate Command interchangeably. The source for the Relay Command is at http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

Then create a separate class that looks like this…

Then import the name space of this class into your Xaml…

Resharper will do this for you, or give you an intellesense prompt.

Finally wire up the View Model. Use the quick and dirty method like this…

Then, after the name spaces are resolved and the wiring is correct, it will start to work. Anchor your debugger in the Execute method and observe that you get a RoutedEvent argument. You can parse this to get which Tree view item was expanded.

The key aspect in…

View original post 50 more words