diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GrayOutDesignerExceptActiveArea.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GrayOutDesignerExceptActiveArea.cs index 700ab946dc..453a6bd835 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GrayOutDesignerExceptActiveArea.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GrayOutDesignerExceptActiveArea.cs @@ -89,22 +89,23 @@ namespace ICSharpCode.WpfDesign.Designer.Controls grayOut.adornerPanel.SetAdornedElement(designPanel.Context.RootItem.View, null); grayOut.adornerPanel.Children.Add(grayOut); grayOut.ActiveAreaGeometry = new RectangleGeometry(activeRectInActiveContainer, 0, 0, (Transform)activeContainer.TransformToVisual(grayOut.adornerPanel.AdornedElement)); - Animate(grayOut.GrayOutBrush, Brush.OpacityProperty, 0, MaxOpacity); + Animate(grayOut.GrayOutBrush, Brush.OpacityProperty, MaxOpacity); designPanel.Adorners.Add(grayOut.adornerPanel); } } static readonly TimeSpan animationTime = new TimeSpan(2000000); - static void Animate(Animatable element, DependencyProperty property, double from, double to) + static void Animate(Animatable element, DependencyProperty property, double to) { - element.BeginAnimation(property, new DoubleAnimation(from, to, new Duration(animationTime), FillBehavior.Stop)); + element.BeginAnimation(property, new DoubleAnimation(to, new Duration(animationTime), FillBehavior.HoldEnd), + HandoffBehavior.SnapshotAndReplace); } internal static void Stop(ref GrayOutDesignerExceptActiveArea grayOut) { if (grayOut != null) { - Animate(grayOut.GrayOutBrush, Brush.OpacityProperty, MaxOpacity, 0); + Animate(grayOut.GrayOutBrush, Brush.OpacityProperty, 0); IDesignPanel designPanel = grayOut.designPanel; AdornerPanel adornerPanelToRemove = grayOut.adornerPanel; DispatcherTimer timer = new DispatcherTimer(); diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/GridPlacementSupport.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/GridPlacementSupport.cs index cd51501f95..bc56967200 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/GridPlacementSupport.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/GridPlacementSupport.cs @@ -265,6 +265,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions public override void LeaveContainer(PlacementOperation operation) { + GrayOutDesignerExceptActiveArea.Stop(ref grayOut); base.LeaveContainer(operation); foreach (PlacementInformation info in operation.PlacedItems) { if (info.Item.ComponentType == typeof(ColumnDefinition)) { diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.sln b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.sln index 8e9b6fbf80..05b7895302 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.sln +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.sln @@ -1,6 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 +# SharpDevelop 3.1.0.4545 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}" @@ -9,8 +10,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "WpfDesign\Proj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlDesigner", "..\..\..\..\samples\XamlDesigner\XamlDesigner.csproj", "{27DA2B5C-2AAA-4478-AB00-3E184273C241}" EndProject Global @@ -35,10 +34,6 @@ Global {943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.Build.0 = Debug|Any CPU {943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.ActiveCfg = Release|Any CPU {943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.Build.0 = Release|Any CPU - {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}.Release|Any CPU.Build.0 = Release|Any CPU {27DA2B5C-2AAA-4478-AB00-3E184273C241}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {27DA2B5C-2AAA-4478-AB00-3E184273C241}.Debug|Any CPU.Build.0 = Debug|Any CPU {27DA2B5C-2AAA-4478-AB00-3E184273C241}.Release|Any CPU.ActiveCfg = Release|Any CPU