1// Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2// This file is distributed under GPL v3. See LICENSE.md for details.
3using System.Windows;
4using System.Windows.Controls;
5using System.Windows.Input;
6
7namespace SiliconStudio.Presentation.Behaviors
8 {
9 /// <summary>
10 /// A behavior that can be attached to a <see cref="TextBox"/> and will close the window it is contained in when <see cref="Key.Enter"/> is pressed.
11 /// A command can ben executed before closing the window, you can use the <see cref="CloseWindowBehavior{T}.Command"/> and <see cref="CloseWindowBehavior{T}.CommandParameter"/> property of this behavior.