Browse Source

Merge pull request #449 from jogibear9988/master

Few fixes for XAML Designer in Sharp Develop
pull/463/head
Siegfried Pammer 11 years ago
parent
commit
961c05c1c2
  1. 85
      samples/XamlDesigner/App.xaml.cs
  2. 45
      samples/XamlDesigner/Configuration/Settings.Designer.cs
  3. 45
      samples/XamlDesigner/Configuration/Settings.settings
  4. 12
      samples/XamlDesigner/MainWindow.xaml
  5. 79
      samples/XamlDesigner/MainWindow_Commands.cs
  6. 4
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs
  7. 68
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs
  8. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/InPlaceEditorExtension.cs
  9. 1
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/BoolEditor.xaml
  10. 7
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml
  11. 29
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml.cs
  12. 20
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FlatCollectionEditor.xaml.cs
  13. 17
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml
  14. 38
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml.cs
  15. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml
  16. 30
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml.cs
  17. 4
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/CreateComponentTool.cs
  18. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/MoveLogic.cs
  19. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/PointerTool.cs
  20. 15
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj
  21. 41
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/HitTestType.cs
  22. 7
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/EditorManager.cs
  23. 5
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs
  24. 8
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Tools.cs
  25. 1
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/WpfDesign.csproj
  26. BIN
      src/Libraries/WPFExtendedToolkit/Xceed.Wpf.Toolkit.dll

85
samples/XamlDesigner/App.xaml.cs

@ -2,11 +2,16 @@ using System; @@ -2,11 +2,16 @@ using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Windows;
using ICSharpCode.XamlDesigner.Configuration;
using System.Windows.Threading;
using System.Diagnostics;
using ICSharpCode.WpfDesign.Designer;
using ICSharpCode.XamlDesigner.Configuration;
namespace ICSharpCode.XamlDesigner
{
@ -14,12 +19,70 @@ namespace ICSharpCode.XamlDesigner @@ -14,12 +19,70 @@ namespace ICSharpCode.XamlDesigner
{
public static string[] Args;
protected override void OnStartup(StartupEventArgs e)
{
protected override void OnStartup(StartupEventArgs e)
{
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AppDomain_CurrentDomain_AssemblyResolve);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_CurrentDomain_UnhandledException);
DragDropExceptionHandler.UnhandledException += new ThreadExceptionEventHandler(DragDropExceptionHandler_UnhandledException);
DispatcherUnhandledException += App_DispatcherUnhandledException;
Args = e.Args;
base.OnStartup(e);
}
base.OnStartup(e);
}
private static bool internalLoad = false;
private static string lastRequesting = null;
Assembly AppDomain_CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
if (internalLoad)
return null;
if (args.Name.Split(new [] { ',' })[0].Trim().EndsWith(".resources"))
return null;
internalLoad = true;
Assembly ass = null;
try {
ass = Assembly.Load(args.Name);
}
catch (Exception) { }
if (ass == null && args.RequestingAssembly != null) {
lastRequesting = args.RequestingAssembly.Location;
var dir = Path.GetDirectoryName(args.RequestingAssembly.Location);
var file = args.Name.Split(new [] { ',' })[0].Trim() + ".dll";
try {
ass = Assembly.LoadFrom(Path.Combine(dir, file));
}
catch (Exception) { }
}
else if (lastRequesting != null) {
var dir = Path.GetDirectoryName(lastRequesting);
var file = args.Name.Split(new [] { ',' })[0].Trim() + ".dll";
try {
ass = Assembly.LoadFrom(Path.Combine(dir, file));
}
catch (Exception) { }
}
internalLoad = false;
return ass;
}
void DragDropExceptionHandler_UnhandledException(object sender, ThreadExceptionEventArgs e)
{
Shell.ReportException(e.Exception);
}
void AppDomain_CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Shell.ReportException(e.ExceptionObject as Exception);
}
void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
@ -27,10 +90,10 @@ namespace ICSharpCode.XamlDesigner @@ -27,10 +90,10 @@ namespace ICSharpCode.XamlDesigner
e.Handled = true;
}
protected override void OnExit(ExitEventArgs e)
{
Settings.Default.Save();
base.OnExit(e);
}
protected override void OnExit(ExitEventArgs e)
{
Settings.Default.Save();
base.OnExit(e);
}
}
}

45
samples/XamlDesigner/Configuration/Settings.Designer.cs generated

@ -37,25 +37,34 @@ namespace ICSharpCode.XamlDesigner.Configuration { @@ -37,25 +37,34 @@ namespace ICSharpCode.XamlDesigner.Configuration {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute(@"<DockingManager>
<ResizingPanel Orientation=""Horizontal"">
<ResizingPanel ResizeWidth=""200"" Orientation=""Vertical"">
<DockablePane ResizeHeight=""441.36166666666668"" Anchor=""Left"">
<DockableContent Name=""content1"" AutoHide=""false"" />
</DockablePane>
<DockablePane ResizeWidth=""200"" Anchor=""Left"">
<DockableContent Name=""content2"" AutoHide=""false"" />
</DockablePane>
[global::System.Configuration.DefaultSettingValueAttribute(@"<DockingManager version=""1.3.0"">
<ResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""0,0"" Orientation=""Vertical"">
<ResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1920,1153.04"" Orientation=""Horizontal"">
<ResizingPanel ResizeWidth=""250"" ResizeHeight=""*"" EffectiveSize=""250,1153.04"" Orientation=""Vertical"">
<DockablePane ResizeWidth=""0.742440632565806*"" ResizeHeight=""0.742440632565806*"" EffectiveSize=""250,851.609103178282"" ID=""bb7a5fd3-be24-4636-8fd6-a50a09e65e69"" Anchor=""Left"" IsAutoHidden=""false"">
<DockableContent Name=""content1"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""315"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
<DockablePane ResizeWidth=""0.257559367434194*"" ResizeHeight=""0.257559367434194*"" EffectiveSize=""250,295.430896821718"" ID=""17cd1941-1004-4ed9-8cda-03c254681289"" Anchor=""Left"" IsAutoHidden=""false"">
<DockableContent Name=""content2"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""328"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
</ResizingPanel>
<ResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1408,1153.04"" Orientation=""Vertical"">
<DocumentPaneResizingPanel ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1408,965.04"" Orientation=""Vertical"">
<DocumentPane IsMain=""true"" ResizeWidth=""*"" ResizeHeight=""*"" EffectiveSize=""1408,965.04"" />
</DocumentPaneResizingPanel>
<DockablePane ResizeWidth=""*"" ResizeHeight=""182"" EffectiveSize=""1408,182"" ID=""ebd34b7e-6a89-42c6-b172-0e666b0d8a0a"" Anchor=""Bottom"" IsAutoHidden=""false"">
<DockableContent Name=""content3"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""1920"" Height=""400"" Anchor=""Bottom"" State=""Docked"" />
</DockablePane>
</ResizingPanel>
<ResizingPanel ResizeWidth=""250"" ResizeHeight=""*"" EffectiveSize=""250,1153.04"" Orientation=""Vertical"">
<DockablePane ResizeWidth=""0.145251345356991*"" ResizeHeight=""0.145251345356991*"" EffectiveSize=""250,166.609103178283"" ID=""aa545474-48b3-49a6-b76c-b0c625e79e4c"" Anchor=""Right"" IsAutoHidden=""false"">
<DockableContent Name=""content5"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""550.666666666667"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
<DockablePane ResizeWidth=""0.854748654643009*"" ResizeHeight=""0.854748654643009*"" EffectiveSize=""250,980.430896821717"" ID=""64e5518b-2c83-4e22-908d-a510a6995c27"" Anchor=""Right"" IsAutoHidden=""false"">
<DockableContent Name=""content4"" FloatingWindowSize=""250,400"" ChildIndex=""0"" Width=""399.967430639324"" Height=""1153.04"" Anchor=""Right"" State=""Docked"" />
</DockablePane>
</ResizingPanel>
</ResizingPanel>
<ResizingPanel Orientation=""Vertical"">
<DocumentPanePlaceHolder />
<DockablePane ResizeHeight=""138"" Anchor=""Bottom"">
<DockableContent Name=""content3"" AutoHide=""false"" />
</DockablePane>
</ResizingPanel>
<DockablePane ResizeWidth=""271"" Anchor=""Right"">
<DockableContent Name=""content4"" AutoHide=""false"" />
</DockablePane>
</ResizingPanel>
<Hidden />
<Windows />

45
samples/XamlDesigner/Configuration/Settings.settings

@ -6,25 +6,34 @@ @@ -6,25 +6,34 @@
<Value Profile="(Default)">0,0,0,0</Value>
</Setting>
<Setting Name="AvalonDockLayout" Type="System.String" Scope="User">
<Value Profile="(Default)">&lt;DockingManager&gt;
&lt;ResizingPanel Orientation="Horizontal"&gt;
&lt;ResizingPanel ResizeWidth="200" Orientation="Vertical"&gt;
&lt;DockablePane ResizeHeight="441.36166666666668" Anchor="Left"&gt;
&lt;DockableContent Name="content1" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
&lt;DockablePane ResizeWidth="200" Anchor="Left"&gt;
&lt;DockableContent Name="content2" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
<Value Profile="(Default)">&lt;DockingManager version="1.3.0"&gt;
&lt;ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="0,0" Orientation="Vertical"&gt;
&lt;ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1920,1153.04" Orientation="Horizontal"&gt;
&lt;ResizingPanel ResizeWidth="250" ResizeHeight="*" EffectiveSize="250,1153.04" Orientation="Vertical"&gt;
&lt;DockablePane ResizeWidth="0.742440632565806*" ResizeHeight="0.742440632565806*" EffectiveSize="250,851.609103178282" ID="bb7a5fd3-be24-4636-8fd6-a50a09e65e69" Anchor="Left" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content1" FloatingWindowSize="250,400" ChildIndex="0" Width="315" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;DockablePane ResizeWidth="0.257559367434194*" ResizeHeight="0.257559367434194*" EffectiveSize="250,295.430896821718" ID="17cd1941-1004-4ed9-8cda-03c254681289" Anchor="Left" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content2" FloatingWindowSize="250,400" ChildIndex="0" Width="328" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;ResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1408,1153.04" Orientation="Vertical"&gt;
&lt;DocumentPaneResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="1408,965.04" Orientation="Vertical"&gt;
&lt;DocumentPane IsMain="true" ResizeWidth="*" ResizeHeight="*" EffectiveSize="1408,965.04" /&gt;
&lt;/DocumentPaneResizingPanel&gt;
&lt;DockablePane ResizeWidth="*" ResizeHeight="182" EffectiveSize="1408,182" ID="ebd34b7e-6a89-42c6-b172-0e666b0d8a0a" Anchor="Bottom" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content3" FloatingWindowSize="250,400" ChildIndex="0" Width="1920" Height="400" Anchor="Bottom" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;ResizingPanel ResizeWidth="250" ResizeHeight="*" EffectiveSize="250,1153.04" Orientation="Vertical"&gt;
&lt;DockablePane ResizeWidth="0.145251345356991*" ResizeHeight="0.145251345356991*" EffectiveSize="250,166.609103178283" ID="aa545474-48b3-49a6-b76c-b0c625e79e4c" Anchor="Right" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content5" FloatingWindowSize="250,400" ChildIndex="0" Width="550.666666666667" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;DockablePane ResizeWidth="0.854748654643009*" ResizeHeight="0.854748654643009*" EffectiveSize="250,980.430896821717" ID="64e5518b-2c83-4e22-908d-a510a6995c27" Anchor="Right" IsAutoHidden="false"&gt;
&lt;DockableContent Name="content4" FloatingWindowSize="250,400" ChildIndex="0" Width="399.967430639324" Height="1153.04" Anchor="Right" State="Docked" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;/ResizingPanel&gt;
&lt;ResizingPanel Orientation="Vertical"&gt;
&lt;DocumentPanePlaceHolder /&gt;
&lt;DockablePane ResizeHeight="138" Anchor="Bottom"&gt;
&lt;DockableContent Name="content3" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;DockablePane ResizeWidth="271" Anchor="Right"&gt;
&lt;DockableContent Name="content4" AutoHide="false" /&gt;
&lt;/DockablePane&gt;
&lt;/ResizingPanel&gt;
&lt;Hidden /&gt;
&lt;Windows /&gt;

12
samples/XamlDesigner/MainWindow.xaml

@ -42,6 +42,12 @@ @@ -42,6 +42,12 @@
<CommandBinding Command="Default:MainWindow.ExitCommand"
Executed="ExitCommand_Executed" />
<CommandBinding Command="Default:MainWindow.RunCommand"
Executed="RunCommand_Executed" />
<CommandBinding Command="Default:MainWindow.RenderToBitmapCommand"
Executed="RenderToBitmapCommand_Executed" />
</Window.CommandBindings>
<DockPanel>
@ -78,8 +84,12 @@ @@ -78,8 +84,12 @@
<MenuItem Command="Default:MainWindow.RefreshCommand" />
<MenuItem Command="Find" />
</MenuItem>
<MenuItem Header="Test">
<MenuItem Command="Default:MainWindow.RunCommand" />
<MenuItem Command="Default:MainWindow.RenderToBitmapCommand" />
</MenuItem>
</Menu>
<AvalonDock:DockingManager x:Name="uxDockingManager">
<AvalonDock:ResizingPanel>

79
samples/XamlDesigner/MainWindow_Commands.cs

@ -1,9 +1,18 @@ @@ -1,9 +1,18 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Input;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Xml;
using Microsoft.Win32;
namespace ICSharpCode.XamlDesigner
{
@ -13,6 +22,8 @@ namespace ICSharpCode.XamlDesigner @@ -13,6 +22,8 @@ namespace ICSharpCode.XamlDesigner
public static SimpleCommand SaveAllCommand = new SimpleCommand("Save All", ModifierKeys.Control | ModifierKeys.Shift, Key.S);
public static SimpleCommand ExitCommand = new SimpleCommand("Exit");
public static SimpleCommand RefreshCommand = new SimpleCommand("Refresh", Key.F5);
public static SimpleCommand RunCommand = new SimpleCommand("Run", ModifierKeys.Shift, Key.F5);
public static SimpleCommand RenderToBitmapCommand = new SimpleCommand("Render to Bitmap");
static void RenameCommands()
{
@ -59,6 +70,72 @@ namespace ICSharpCode.XamlDesigner @@ -59,6 +70,72 @@ namespace ICSharpCode.XamlDesigner
{
Shell.Instance.SaveAll();
}
void RunCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
StringBuilder sb = new StringBuilder();
var xmlWriter = XmlWriter.Create(new StringWriter(sb));
Shell.Instance.CurrentDocument.DesignSurface.SaveDesigner(xmlWriter);
var txt = sb.ToString();
var xmlReader = XmlReader.Create(new StringReader(txt));
var ctl = XamlReader.Load(xmlReader);
Window wnd = ctl as Window;
if (wnd == null) {
wnd = new Window();
wnd.Content = ctl;
}
wnd.Show();
}
void RenderToBitmapCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
int desiredWidth = 300;
int desiredHeight = 300;
StringBuilder sb = new StringBuilder();
var xmlWriter = XmlWriter.Create(new StringWriter(sb));
Shell.Instance.CurrentDocument.DesignSurface.SaveDesigner(xmlWriter);
var txt = sb.ToString();
var xmlReader = XmlReader.Create(new StringReader(txt));
var ctl = XamlReader.Load(xmlReader) as Control;
if (ctl is Window) {
var wnd = ctl as Window;
wnd.Width = desiredWidth;
wnd.Height = desiredHeight;
wnd.Top = -10000;
wnd.Left = -10000;
wnd.Show();
} else {
ctl.Measure(new Size(desiredWidth, desiredHeight));
ctl.Arrange(new Rect(new Size(desiredWidth, desiredHeight)));
}
RenderTargetBitmap bmp = new RenderTargetBitmap(300, 300, 96, 96, PixelFormats.Default);
bmp.Render(ctl);
var encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(bmp));
var dlg = new SaveFileDialog();
dlg.Filter = "*.png|*.png";
if (dlg.ShowDialog() == true) {
using (Stream stm = File.OpenWrite(dlg.FileName)) {
encoder.Save(stm);
stm.Flush();
}
}
if (ctl is Window) {
var wnd = ctl as Window;
wnd.Close();
}
}
void ExitCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{

4
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs

@ -163,6 +163,8 @@ namespace ICSharpCode.WpfDesign.Designer @@ -163,6 +163,8 @@ namespace ICSharpCode.WpfDesign.Designer
Metadata.AddPopularProperty(typeof(Binding), "ElementName");
Metadata.AddPopularProperty(typeof(Binding), "Converter");
Metadata.AddPopularProperty(typeof(Binding), "XPath");
Metadata.AddPopularProperty(typeof(ItemsControl), "Items");
Metadata.AddValueRange(Block.LineHeightProperty, double.Epsilon, double.MaxValue);
Metadata.AddValueRange(Canvas.BottomProperty, double.MinValue, double.MaxValue);
@ -219,7 +221,7 @@ namespace ICSharpCode.WpfDesign.Designer @@ -219,7 +221,7 @@ namespace ICSharpCode.WpfDesign.Designer
Metadata.HideProperty(typeof(UIElement), "RenderSize");
Metadata.HideProperty(FrameworkElement.NameProperty);
Metadata.HideProperty(typeof(FrameworkElement), "Resources");
//Metadata.HideProperty(typeof(FrameworkElement), "Resources");
Metadata.HideProperty(typeof(Window), "Owner");
//Metadata.DisablePlacement(typeof(Button));

68
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs

@ -35,6 +35,10 @@ namespace ICSharpCode.WpfDesign.Designer @@ -35,6 +35,10 @@ namespace ICSharpCode.WpfDesign.Designer
public sealed class DesignPanel : Decorator, IDesignPanel, INotifyPropertyChanged
{
#region Hit Testing
private List<DependencyObject> hitTestElements = new List<DependencyObject>();
private DependencyObject lastElement;
/// <summary>
/// this element is always hit (unless HitTestVisible is set to false)
/// </summary>
@ -54,7 +58,7 @@ namespace ICSharpCode.WpfDesign.Designer @@ -54,7 +58,7 @@ namespace ICSharpCode.WpfDesign.Designer
void RunHitTest(Visual reference, Point point, HitTestFilterCallback filterCallback, HitTestResultCallback resultCallback)
{
VisualTreeHelper.HitTest(reference, filterCallback, resultCallback,
new PointHitTestParameters(point));
new PointHitTestParameters(point));
}
HitTestFilterBehavior FilterHitTestInvisibleElements(DependencyObject potentialHitTestTarget)
@ -70,9 +74,10 @@ namespace ICSharpCode.WpfDesign.Designer @@ -70,9 +74,10 @@ namespace ICSharpCode.WpfDesign.Designer
if (designItem != null && designItem.IsDesignTimeLocked) {
return HitTestFilterBehavior.ContinueSkipSelfAndChildren;
}
}
}
hitTestElements.Add(element);
return HitTestFilterBehavior.Continue;
}
@ -80,14 +85,17 @@ namespace ICSharpCode.WpfDesign.Designer @@ -80,14 +85,17 @@ namespace ICSharpCode.WpfDesign.Designer
/// <summary>
/// Performs a custom hit testing lookup for the specified mouse event args.
/// </summary>
public DesignPanelHitTestResult HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface)
public DesignPanelHitTestResult HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, HitTestType hitTestType)
{
hitTestElements.Clear();
DesignPanelHitTestResult result = DesignPanelHitTestResult.NoHit;
HitTest(mousePosition, testAdorners, testDesignSurface,
delegate(DesignPanelHitTestResult r) {
result = r;
return false;
});
delegate(DesignPanelHitTestResult r) {
result = r;
return false;
}, hitTestType);
return result;
}
@ -95,7 +103,7 @@ namespace ICSharpCode.WpfDesign.Designer @@ -95,7 +103,7 @@ namespace ICSharpCode.WpfDesign.Designer
/// Performs a hit test on the design surface, raising <paramref name="callback"/> for each match.
/// Hit testing continues while the callback returns true.
/// </summary>
public void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate<DesignPanelHitTestResult> callback)
public void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate<DesignPanelHitTestResult> callback, HitTestType hitTestType)
{
if (mousePosition.X < 0 || mousePosition.Y < 0 || mousePosition.X > this.RenderSize.Width || mousePosition.Y > this.RenderSize.Height) {
return;
@ -104,6 +112,8 @@ namespace ICSharpCode.WpfDesign.Designer @@ -104,6 +112,8 @@ namespace ICSharpCode.WpfDesign.Designer
bool continueHitTest = true;
hitTestElements.Clear();
if (testAdorners) {
RunHitTest(
_adornerLayer, mousePosition, FilterHitTestInvisibleElements,
@ -135,6 +145,19 @@ namespace ICSharpCode.WpfDesign.Designer @@ -135,6 +145,19 @@ namespace ICSharpCode.WpfDesign.Designer
ViewService viewService = _context.Services.View;
DependencyObject obj = result.VisualHit;
if (hitTestType == HitTestType.ElementSelection)
{
if (Keyboard.IsKeyDown(Key.LeftAlt))
if (lastElement != null && lastElement != _context.RootItem.Component &&
hitTestElements.Contains(lastElement))
{
var idx = hitTestElements.IndexOf(lastElement) - 1;
if (idx >= 0)
obj = hitTestElements[idx];
}
}
while (obj != null) {
if ((customResult.ModelHit = viewService.GetModel(obj)) != null)
break;
@ -143,6 +166,13 @@ namespace ICSharpCode.WpfDesign.Designer @@ -143,6 +166,13 @@ namespace ICSharpCode.WpfDesign.Designer
if (customResult.ModelHit == null) {
customResult.ModelHit = _context.RootItem;
}
if (hitTestType == HitTestType.ElementSelection)
{
lastElement = obj;
}
continueHitTest = callback(customResult);
return continueHitTest ? HitTestResultBehavior.Continue : HitTestResultBehavior.Stop;
} else {
@ -223,7 +253,7 @@ namespace ICSharpCode.WpfDesign.Designer @@ -223,7 +253,7 @@ namespace ICSharpCode.WpfDesign.Designer
}
}
}
/// <summary>
/// Enables / Disables the Raster Placement
/// </summary>
@ -341,14 +371,14 @@ namespace ICSharpCode.WpfDesign.Designer @@ -341,14 +371,14 @@ namespace ICSharpCode.WpfDesign.Designer
if (e.Key == Key.Left || e.Key == Key.Right || e.Key == Key.Up || e.Key == Key.Down)
{
e.Handled = true;
if (placementOp == null) {
dx = 0;
dy = 0;
placementOp = PlacementOperation.Start(Context.Services.Selection.SelectedItems, PlacementType.Move);
}
dx += (e.Key == Key.Left) ? Keyboard.IsKeyDown(Key.LeftShift) ? -10 : -1 : 0;
dy += (e.Key == Key.Up) ? Keyboard.IsKeyDown(Key.LeftShift) ? -10 : -1 : 0;
dx += (e.Key == Key.Right) ? Keyboard.IsKeyDown(Key.LeftShift) ? 10 : 1 : 0;
@ -358,18 +388,18 @@ namespace ICSharpCode.WpfDesign.Designer @@ -358,18 +388,18 @@ namespace ICSharpCode.WpfDesign.Designer
if (!Keyboard.IsKeyDown(Key.LeftCtrl))
{
info.Bounds = new Rect(info.OriginalBounds.Left + dx,
info.OriginalBounds.Top + dy,
info.OriginalBounds.Width,
info.OriginalBounds.Height);
info.OriginalBounds.Top + dy,
info.OriginalBounds.Width,
info.OriginalBounds.Height);
}
else
{
info.Bounds = new Rect(info.OriginalBounds.Left,
info.OriginalBounds.Top,
info.OriginalBounds.Width + dx,
info.OriginalBounds.Height + dy);
info.OriginalBounds.Top,
info.OriginalBounds.Width + dx,
info.OriginalBounds.Height + dy);
}
placementOp.CurrentContainerBehavior.SetPosition(info);
}
}

6
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/InPlaceEditorExtension.cs

@ -159,7 +159,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -159,7 +159,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
void MouseDown(object sender,MouseEventArgs e)
{
result = designPanel.HitTest(e.GetPosition(designPanel), false, true);
result = designPanel.HitTest(e.GetPosition(designPanel), false, true, HitTestType.Default);
if(result.ModelHit==ExtendedItem && result.VisualHit is TextBlock) {
Start = Mouse.GetPosition(null);
Current = Start;
@ -171,7 +171,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -171,7 +171,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
void MouseMove(object sender, MouseEventArgs e)
{
Current += e.GetPosition(null) - Start;
result = designPanel.HitTest(e.GetPosition(designPanel), false, true);
result = designPanel.HitTest(e.GetPosition(designPanel), false, true, HitTestType.Default);
if (result.ModelHit == ExtendedItem && result.VisualHit is TextBlock) {
if (numClicks > 0) {
if (isMouseDown &&
@ -190,7 +190,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -190,7 +190,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
void MouseUp(object sender,MouseEventArgs e)
{
result = designPanel.HitTest(e.GetPosition(designPanel), false, true);
result = designPanel.HitTest(e.GetPosition(designPanel), false, true, HitTestType.Default);
if (result.ModelHit == ExtendedItem && result.VisualHit is TextBlock && numClicks>0){
if (!isGettingDragged) {
PlaceEditor(result.VisualHit, e);

1
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/BoolEditor.xaml

@ -3,5 +3,6 @@ @@ -3,5 +3,6 @@
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
IsChecked="{Binding Value}"
Focusable="False"
>
</CheckBox>

7
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
<xctk:ColorPicker x:Class="ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.ColorEditor"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Focusable="False"
SelectedColor="{Binding Value}">
</xctk:ColorPicker>

29
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/ColorEditor.xaml.cs

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ICSharpCode.WpfDesign.PropertyGrid;
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors
{
[TypeEditor(typeof(Color))]
public partial class ColorEditor
{
public ColorEditor()
{
InitializeComponent();
}
}
}

20
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FlatCollectionEditor.xaml.cs

@ -57,18 +57,28 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors @@ -57,18 +57,28 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors
this.Owner = Application.Current.MainWindow;
}
public Type GetItemsSourceType(Type t)
{
Type tp = t.GetInterfaces().FirstOrDefault(x => x.IsGenericType && x.GetGenericTypeDefinition() == typeof(ICollection<>));
return (tp != null ) ? tp.GetGenericArguments()[0] : null;
}
public void LoadItemsCollection(DesignItemProperty itemProperty)
{
_itemProperty = itemProperty;
_componentService=_itemProperty.DesignItem.Services.Component;
TypeMappings.TryGetValue(_itemProperty.ReturnType, out _type);
_type = _type ?? GetItemsSourceType(_itemProperty.ReturnType);
if (_type == null) {
PropertyGridView.IsEnabled=false;
ListBox.IsEnabled=false;
//PropertyGridView.IsEnabled=false;
//ListBox.IsEnabled=false;
AddItem.IsEnabled=false;
RemoveItem.IsEnabled=false;
MoveUpItem.IsEnabled=false;
MoveDownItem.IsEnabled=false;
//RemoveItem.IsEnabled=false;
//MoveUpItem.IsEnabled=false;
//MoveDownItem.IsEnabled=false;
}
ListBox.ItemsSource = _itemProperty.CollectionElements;

17
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<UserControl
x:Class="ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.OpenCollectionEditor" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<TextBlock
Margin="0,0,20,0"
Text="{Binding Value}" VerticalAlignment="Center" />
<Button
Width="15"
Margin="0,0,1,0"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
Content="..."
Focusable="False"
Click="open_Click" />
</Grid>
</UserControl>

38
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/OpenCollectionEditor.xaml.cs

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ICSharpCode.WpfDesign.PropertyGrid;
//using Xceed.Wpf.Toolkit;
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors
{
[TypeEditor(typeof(ICollection))]
public partial class OpenCollectionEditor : UserControl
{
public OpenCollectionEditor()
{
InitializeComponent();
}
void open_Click(object sender, RoutedEventArgs e)
{
var node = this.DataContext as PropertyNode;
var editor = new FlatCollectionEditor();
editor.LoadItemsCollection(node.FirstProperty);
editor.ShowDialog();
}
}
}

6
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml

@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
<xctk:TimeSpanUpDown x:Class="ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.TimeSpanEditor"
xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Value="{Binding Value}">
</xctk:TimeSpanUpDown>

30
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/TimeSpanEditor.xaml.cs

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ICSharpCode.WpfDesign.PropertyGrid;
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors
{
[TypeEditor(typeof(TimeSpan))]
public partial class TimeSpanEditor
{
public TimeSpanEditor()
{
InitializeComponent();
}
}
}

4
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/CreateComponentTool.cs

@ -86,7 +86,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -86,7 +86,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
if (e.Data.GetData(typeof(CreateComponentTool)) != this) return;
// TODO: dropLayer in designPanel
designPanel.IsAdornerLayerHitTestVisible = false;
DesignPanelHitTestResult result = designPanel.HitTest(p, false, true);
DesignPanelHitTestResult result = designPanel.HitTest(p, false, true, HitTestType.Default);
if (result.ModelHit != null) {
designPanel.Focus();
@ -180,7 +180,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -180,7 +180,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
if (e.ChangedButton == MouseButton.Left && MouseGestureBase.IsOnlyButtonPressed(e, MouseButton.Left)) {
e.Handled = true;
IDesignPanel designPanel = (IDesignPanel)sender;
DesignPanelHitTestResult result = designPanel.HitTest(e.GetPosition(designPanel), false, true);
DesignPanelHitTestResult result = designPanel.HitTest(e.GetPosition(designPanel), false, true, HitTestType.Default);
if (result.ModelHit != null) {
IPlacementBehavior behavior = result.ModelHit.GetBehavior<IPlacementBehavior>();
if (behavior != null) {

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/MoveLogic.cs

@ -124,7 +124,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -124,7 +124,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
return true; // continue hit testing
result = r;
return false; // finish hit testing
});
}, HitTestType.Default);
return result;
}

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/PointerTool.cs

@ -42,7 +42,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -42,7 +42,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
void OnMouseDown(object sender, MouseButtonEventArgs e)
{
IDesignPanel designPanel = (IDesignPanel)sender;
DesignPanelHitTestResult result = designPanel.HitTest(e.GetPosition(designPanel), false, true);
DesignPanelHitTestResult result = designPanel.HitTest(e.GetPosition(designPanel), false, true, HitTestType.ElementSelection);
if (result.ModelHit != null) {
IHandlePointerToolMouseDown b = result.ModelHit.GetBehavior<IHandlePointerToolMouseDown>();
if (b != null) {

15
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj

@ -75,6 +75,9 @@ @@ -75,6 +75,9 @@
<Private>False</Private>
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="Xceed.Wpf.Toolkit">
<HintPath>..\..\..\..\..\Libraries\WPFExtendedToolkit\Xceed.Wpf.Toolkit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\..\..\Main\GlobalAssemblyInfo.cs">
@ -89,10 +92,19 @@ @@ -89,10 +92,19 @@
<Compile Include="Extensions\RightClickContextMenuExtension.cs" />
<Compile Include="Extensions\SkewThumbExtension.cs" />
<Compile Include="Extensions\TopLeftContainerDragHandleMultipleItems.cs" />
<Compile Include="PropertyGrid\Editors\ColorEditor.xaml.cs">
<DependentUpon>ColorEditor.xaml</DependentUpon>
</Compile>
<Compile Include="PropertyGrid\Editors\FlatCollectionEditor.xaml.cs">
<DependentUpon>FlatCollectionEditor.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="PropertyGrid\Editors\OpenCollectionEditor.xaml.cs">
<DependentUpon>OpenCollectionEditor.xaml</DependentUpon>
</Compile>
<Compile Include="PropertyGrid\Editors\TimeSpanEditor.xaml.cs">
<DependentUpon>TimeSpanEditor.xaml</DependentUpon>
</Compile>
<Compile Include="Translations.cs" />
<Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="Controls\AdornerLayer.cs" />
@ -251,7 +263,10 @@ @@ -251,7 +263,10 @@
</ItemGroup>
<ItemGroup>
<Page Include="Extensions\RightClickContextMenu.xaml" />
<Page Include="PropertyGrid\Editors\ColorEditor.xaml" />
<Page Include="PropertyGrid\Editors\FlatCollectionEditor.xaml" />
<Page Include="PropertyGrid\Editors\OpenCollectionEditor.xaml" />
<Page Include="PropertyGrid\Editors\TimeSpanEditor.xaml" />
<Page Include="ThumbnailView\ThumbnailView.xaml" />
<ProjectReference Include="..\..\..\..\..\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj">
<Project>{8035765F-D51F-4A0C-A746-2FD100E19419}</Project>

41
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/HitTestType.cs

@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ICSharpCode.WpfDesign
{
/// <summary>
///
/// </summary>
public enum HitTestType
{
/// <summary>
///
/// </summary>
Default,
/// <summary>
///
/// </summary>
ElementSelection,
}
}

7
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/EditorManager.cs

@ -51,6 +51,13 @@ namespace ICSharpCode.WpfDesign.PropertyGrid @@ -51,6 +51,13 @@ namespace ICSharpCode.WpfDesign.PropertyGrid
}
type = type.BaseType;
}
foreach (var t in typeEditors) {
if (t.Key.IsAssignableFrom(property.ReturnType)) {
return (FrameworkElement)Activator.CreateInstance(t.Value);
}
}
if (editorType == null) {
var standardValues = Metadata.GetStandardValues(property.ReturnType);
if (standardValues != null) {

5
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/TypeHelper.cs

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -93,7 +94,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid @@ -93,7 +94,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid
foreach (PropertyDescriptor p in TypeDescriptor.GetProperties(element))
{
if (!p.IsBrowsable) continue;
if (p.IsReadOnly) continue;
if (p.IsReadOnly && !typeof(ICollection).IsAssignableFrom(p.PropertyType)) continue;
if (hiddenPropertiesOnWindow.Contains(p.Name)) continue;
if (p.Attributes.OfType<ObsoleteAttribute>().Count() != 0) continue;
yield return p;
@ -103,7 +104,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid @@ -103,7 +104,7 @@ namespace ICSharpCode.WpfDesign.PropertyGrid
{
foreach(PropertyDescriptor p in TypeDescriptor.GetProperties(element)){
if (!p.IsBrowsable) continue;
if (p.IsReadOnly) continue;
if (p.IsReadOnly && !typeof(ICollection).IsAssignableFrom(p.PropertyType)) continue;
if (p.Attributes.OfType<ObsoleteAttribute>().Count()!=0) continue;
yield return p;
}

8
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Tools.cs

@ -99,14 +99,14 @@ namespace ICSharpCode.WpfDesign @@ -99,14 +99,14 @@ namespace ICSharpCode.WpfDesign
/// <summary>
/// Performs a hit test on the design surface.
/// </summary>
DesignPanelHitTestResult HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface);
DesignPanelHitTestResult HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, HitTestType hitTestType);
/// <summary>
/// Performs a hit test on the design surface, raising <paramref name="callback"/> for each match.
/// Hit testing continues while the callback returns true.
/// </summary>
void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate<DesignPanelHitTestResult> callback);
void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurface, Predicate<DesignPanelHitTestResult> callback, HitTestType hitTestType);
// The following members were missing in <see cref="IInputElement"/>, but
// are supported on the DesignPanel:

1
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/WpfDesign.csproj

@ -74,6 +74,7 @@ @@ -74,6 +74,7 @@
<Compile Include="Adorners\AdornerProviderClasses.cs" />
<Compile Include="Adorners\RelativePlacement.cs" />
<Compile Include="ExtensionMethods.cs" />
<Compile Include="HitTestType.cs" />
<Compile Include="Metadata.cs" />
<Compile Include="PlacementInformation.cs" />
<Compile Include="PlacementBehavior.cs" />

BIN
src/Libraries/WPFExtendedToolkit/Xceed.Wpf.Toolkit.dll

Binary file not shown.
Loading…
Cancel
Save