Browse Source

GrayOutDesignerExceptActiveArea bugfixes

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4771 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 16 years ago
parent
commit
15a491ab76
  1. 9
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GrayOutDesignerExceptActiveArea.cs
  2. 1
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/GridPlacementSupport.cs
  3. 7
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.sln

9
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.SetAdornedElement(designPanel.Context.RootItem.View, null);
grayOut.adornerPanel.Children.Add(grayOut); grayOut.adornerPanel.Children.Add(grayOut);
grayOut.ActiveAreaGeometry = new RectangleGeometry(activeRectInActiveContainer, 0, 0, (Transform)activeContainer.TransformToVisual(grayOut.adornerPanel.AdornedElement)); 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); designPanel.Adorners.Add(grayOut.adornerPanel);
} }
} }
static readonly TimeSpan animationTime = new TimeSpan(2000000); 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) internal static void Stop(ref GrayOutDesignerExceptActiveArea grayOut)
{ {
if (grayOut != null) { if (grayOut != null) {
Animate(grayOut.GrayOutBrush, Brush.OpacityProperty, MaxOpacity, 0); Animate(grayOut.GrayOutBrush, Brush.OpacityProperty, 0);
IDesignPanel designPanel = grayOut.designPanel; IDesignPanel designPanel = grayOut.designPanel;
AdornerPanel adornerPanelToRemove = grayOut.adornerPanel; AdornerPanel adornerPanelToRemove = grayOut.adornerPanel;
DispatcherTimer timer = new DispatcherTimer(); DispatcherTimer timer = new DispatcherTimer();

1
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) public override void LeaveContainer(PlacementOperation operation)
{ {
GrayOutDesignerExceptActiveArea.Stop(ref grayOut);
base.LeaveContainer(operation); base.LeaveContainer(operation);
foreach (PlacementInformation info in operation.PlacedItems) { foreach (PlacementInformation info in operation.PlacedItems) {
if (info.Item.ComponentType == typeof(ColumnDefinition)) { if (info.Item.ComponentType == typeof(ColumnDefinition)) {

7
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.sln

@ -1,6 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008 # 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}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}" 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 EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}"
EndProject 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}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlDesigner", "..\..\..\..\samples\XamlDesigner\XamlDesigner.csproj", "{27DA2B5C-2AAA-4478-AB00-3E184273C241}"
EndProject EndProject
Global Global
@ -35,10 +34,6 @@ Global
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Debug|Any CPU.Build.0 = Debug|Any CPU {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.ActiveCfg = Release|Any CPU
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}.Release|Any CPU.Build.0 = 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.ActiveCfg = Debug|Any CPU
{27DA2B5C-2AAA-4478-AB00-3E184273C241}.Debug|Any CPU.Build.0 = 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 {27DA2B5C-2AAA-4478-AB00-3E184273C241}.Release|Any CPU.ActiveCfg = Release|Any CPU

Loading…
Cancel
Save