Browse Source

Rename DesignSite -> DesignItem.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2222 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
f182568b29
  1. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs
  2. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignSurface.cs
  3. 56
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/ServiceRequiredException.cs
  4. 22
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/ComponentService.cs
  5. 45
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/SelectionService.cs
  6. 15
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/VisualDesignService.cs
  7. 3
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj
  8. 15
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/XamlDesignItem.cs
  9. 10
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DefaultServiceProvider.cs
  10. 5
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DesignItem.cs
  11. 24
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/EventArgs.cs
  12. 24
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Services.cs
  13. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Tools.cs
  14. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/WpfDesign.csproj

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

@ -65,7 +65,7 @@ namespace ICSharpCode.WpfDesign.Designer @@ -65,7 +65,7 @@ namespace ICSharpCode.WpfDesign.Designer
base.OnPreviewMouseDown(e);
if (!_isInInputAction) {
Debug.WriteLine("DesignPanel.PreviewMouseDown Source=" + e.Source.GetType().Name + " OriginalSource=" + e.OriginalSource.GetType().Name);
DesignSite site = FindDesignedElementForOriginalSource(e.OriginalSource);
DesignItem site = FindDesignedElementForOriginalSource(e.OriginalSource);
if (site != null) {
Debug.WriteLine(" Found designed element: " + site.Component.GetType().Name);
}
@ -73,11 +73,11 @@ namespace ICSharpCode.WpfDesign.Designer @@ -73,11 +73,11 @@ namespace ICSharpCode.WpfDesign.Designer
}
}
public DesignSite FindDesignedElementForOriginalSource(object originalSource)
public DesignItem FindDesignedElementForOriginalSource(object originalSource)
{
if (originalSource == null)
return null;
DesignSite site = _services.Component.GetSite(originalSource);
DesignItem site = _services.Component.GetDesignItem(originalSource);
if (site != null)
return site;
if (originalSource == _innerDesignPanel)

6
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignSurface.cs

@ -85,8 +85,10 @@ namespace ICSharpCode.WpfDesign.Designer @@ -85,8 +85,10 @@ namespace ICSharpCode.WpfDesign.Designer
void InitializeDesigner(XamlDocument document)
{
_currentDocument = document;
DesignSite rootSite = _componentService.RegisterXamlComponentRecursive(document.RootElement);
_designPanel.DesignedElement = DefaultVisualDesignService.CreateUIElementFor(rootSite);
XamlDesignItem rootSite = _componentService.RegisterXamlComponentRecursive(document.RootElement);
UIElement rootUI = DefaultVisualDesignService.CreateUIElementFor(rootSite);
rootSite.SetView(rootUI);
_designPanel.DesignedElement = rootUI;
}
/// <summary>

56
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/ServiceRequiredException.cs

@ -0,0 +1,56 @@ @@ -0,0 +1,56 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Runtime.Serialization;
namespace ICSharpCode.WpfDesign.Designer
{
/// <summary>
/// Exception class used for designer failures.
/// </summary>
[Serializable]
public class ServiceRequiredException : DesignerException
{
/// <summary>
/// Create a new ServiceRequiredException instance.
/// </summary>
public ServiceRequiredException(Type serviceType)
: this("Service " + serviceType.FullName + " is required.")
{
}
/// <summary>
/// Create a new ServiceRequiredException instance.
/// </summary>
public ServiceRequiredException()
{
}
/// <summary>
/// Create a new ServiceRequiredException instance.
/// </summary>
public ServiceRequiredException(string message) : base(message)
{
}
/// <summary>
/// Create a new ServiceRequiredException instance.
/// </summary>
public ServiceRequiredException(string message, Exception innerException) : base(message, innerException)
{
}
/// <summary>
/// Create a new ServiceRequiredException instance.
/// </summary>
protected ServiceRequiredException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}

22
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/ComponentService.cs

@ -20,21 +20,21 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -20,21 +20,21 @@ namespace ICSharpCode.WpfDesign.Designer.Services
this._surface = surface;
}
public event EventHandler<SiteEventArgs> ComponentRegistered;
public event EventHandler<SiteEventArgs> ComponentUnregistered;
public event EventHandler<DesignItemEventArgs> ComponentRegistered;
public event EventHandler<DesignItemEventArgs> ComponentUnregistered;
Dictionary<object, XamlDesignSite> _sites = new Dictionary<object, XamlDesignSite>();
Dictionary<object, XamlDesignItem> _sites = new Dictionary<object, XamlDesignItem>();
public DesignSite GetSite(object component)
public DesignItem GetDesignItem(object component)
{
if (component == null)
throw new ArgumentNullException("component");
XamlDesignSite site;
XamlDesignItem site;
_sites.TryGetValue(component, out site);
return site;
}
public DesignSite RegisterComponentForDesigner(object component)
public DesignItem RegisterComponentForDesigner(object component)
{
if (component == null)
throw new ArgumentNullException("component");
@ -44,7 +44,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -44,7 +44,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
/// <summary>
/// currently for use by UnregisterAllComponents only because it doesn't update the XAML
/// </summary>
void UnregisterComponentFromDesigner(DesignSite site)
void UnregisterComponentFromDesigner(DesignItem site)
{
if (site == null)
throw new ArgumentNullException("site");
@ -53,14 +53,14 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -53,14 +53,14 @@ namespace ICSharpCode.WpfDesign.Designer.Services
throw new ArgumentException("The site was not registered here!");
if (ComponentUnregistered != null) {
ComponentUnregistered(this, new SiteEventArgs(site));
ComponentUnregistered(this, new DesignItemEventArgs(site));
}
}
/// <summary>
/// registers components from an existing XAML tree
/// </summary>
internal XamlDesignSite RegisterXamlComponentRecursive(XamlObject obj)
internal XamlDesignItem RegisterXamlComponentRecursive(XamlObject obj)
{
if (obj == null) return null;
@ -71,10 +71,10 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -71,10 +71,10 @@ namespace ICSharpCode.WpfDesign.Designer.Services
}
}
XamlDesignSite site = new XamlDesignSite(obj, _surface);
XamlDesignItem site = new XamlDesignItem(obj, _surface);
_sites.Add(site.Component, site);
if (ComponentRegistered != null) {
ComponentRegistered(this, new SiteEventArgs(site));
ComponentRegistered(this, new DesignItemEventArgs(site));
}
return site;
}

45
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/SelectionService.cs

@ -17,19 +17,19 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -17,19 +17,19 @@ namespace ICSharpCode.WpfDesign.Designer.Services
/// </summary>
sealed class DefaultSelectionService : ISelectionService
{
HashSet<object> _selectedComponents = new HashSet<object>();
object _primarySelection;
HashSet<DesignItem> _selectedComponents = new HashSet<DesignItem>();
DesignItem _primarySelection;
public bool IsComponentSelected(object component)
public bool IsComponentSelected(DesignItem component)
{
return _selectedComponents.Contains(component);
}
public ICollection<object> SelectedComponents {
public ICollection<DesignItem> SelectedItems {
get { return _selectedComponents.Clone(); }
}
public object PrimarySelection
public DesignItem PrimarySelection
{
get { return _primarySelection; }
}
@ -40,24 +40,24 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -40,24 +40,24 @@ namespace ICSharpCode.WpfDesign.Designer.Services
}
public event EventHandler SelectionChanging;
public event EventHandler<ComponentCollectionEventArgs> SelectionChanged;
public event EventHandler<DesignItemCollectionEventArgs> SelectionChanged;
public event EventHandler PrimarySelectionChanging;
public event EventHandler PrimarySelectionChanged;
public void SetSelectedComponents(ICollection<object> components)
public void SetSelectedComponents(ICollection<DesignItem> components)
{
SetSelectedComponents(components, SelectionTypes.Auto);
}
public void SetSelectedComponents(ICollection<object> components, SelectionTypes selectionType)
public void SetSelectedComponents(ICollection<DesignItem> components, SelectionTypes selectionType)
{
if (components == null)
components = new object[0];
components = new DesignItem[0];
if (SelectionChanging != null)
SelectionChanging(this, EventArgs.Empty);
object newPrimarySelection = _primarySelection;
DesignItem newPrimarySelection = _primarySelection;
if (selectionType == SelectionTypes.Auto) {
if (Keyboard.Modifiers == ModifierKeys.Control)
@ -71,7 +71,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -71,7 +71,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
if ((selectionType & SelectionTypes.Primary) == SelectionTypes.Primary) {
// change primary selection to first new component
newPrimarySelection = null;
foreach (object obj in components) {
foreach (DesignItem obj in components) {
newPrimarySelection = obj;
break;
}
@ -84,18 +84,18 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -84,18 +84,18 @@ namespace ICSharpCode.WpfDesign.Designer.Services
}
}
HashSet<object> componentsToNotifyOfSelectionChange = new HashSet<object>();
HashSet<DesignItem> componentsToNotifyOfSelectionChange = new HashSet<DesignItem>();
switch (selectionType) {
case SelectionTypes.Add:
// add to selection and notify if required
foreach (object obj in components) {
foreach (DesignItem obj in components) {
if (_selectedComponents.Add(obj))
componentsToNotifyOfSelectionChange.Add(obj);
}
break;
case SelectionTypes.Remove:
// remove from selection and notify if required
foreach (object obj in components) {
foreach (DesignItem obj in components) {
if (_selectedComponents.Remove(obj))
componentsToNotifyOfSelectionChange.Add(obj);
}
@ -105,7 +105,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -105,7 +105,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
componentsToNotifyOfSelectionChange.AddRange(_selectedComponents);
// set _selectedCompontents to new components
_selectedComponents.Clear();
foreach (object obj in components) {
foreach (DesignItem obj in components) {
_selectedComponents.Add(obj);
// notify the new components
componentsToNotifyOfSelectionChange.Add(obj);
@ -113,7 +113,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -113,7 +113,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
break;
case SelectionTypes.Toggle:
// toggle selection and notify
foreach (object obj in components) {
foreach (DesignItem obj in components) {
if (_selectedComponents.Contains(obj)) {
_selectedComponents.Remove(obj);
} else {
@ -132,7 +132,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -132,7 +132,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
if (!IsComponentSelected(newPrimarySelection)) {
// primary selection is not selected anymore - change primary selection to any other selected component
newPrimarySelection = null;
foreach (object obj in _selectedComponents) {
foreach (DesignItem obj in _selectedComponents) {
newPrimarySelection = obj;
break;
}
@ -151,17 +151,8 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -151,17 +151,8 @@ namespace ICSharpCode.WpfDesign.Designer.Services
}
}
// Notify the components that changed selection state:
/*
foreach (object obj in componentsToNotifyOfSelectionChange) {
DesignSite objSite = DesignSite.GetSite(obj as DependencyObject);
if (objSite != null)
objSite.Notify(this, null);
}
*/
if (SelectionChanged != null) {
SelectionChanged(this, new ComponentCollectionEventArgs(componentsToNotifyOfSelectionChange));
SelectionChanged(this, new DesignItemCollectionEventArgs(componentsToNotifyOfSelectionChange));
}
}
}

15
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/VisualDesignService.cs

@ -14,7 +14,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -14,7 +14,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
{
sealed class DefaultVisualDesignService : IVisualDesignService
{
public UIElement CreateWrapper(DesignSite site)
public UIElement CreateWrapper(DesignItem site)
{
if (site == null)
throw new ArgumentNullException("site");
@ -27,9 +27,12 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -27,9 +27,12 @@ namespace ICSharpCode.WpfDesign.Designer.Services
return new FallbackObjectWrapper(site);
}
internal static UIElement CreateUIElementFor(DesignSite site)
internal static UIElement CreateUIElementFor(DesignItem site)
{
UIElement element = site.Services.VisualDesign.CreateWrapper(site);
IVisualDesignService service = site.Services.GetService<IVisualDesignService>();
if (service == null)
throw new ServiceRequiredException(typeof(IVisualDesignService));
UIElement element = service.CreateWrapper(site);
if (element != null) {
if (!(element is IVisualDesignObjectWrapper)) {
throw new DesignerException("IVisualDesignService.CreateWrapper must return null or UIElement implementing IVisualDesignObjectWrapper");
@ -46,9 +49,9 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -46,9 +49,9 @@ namespace ICSharpCode.WpfDesign.Designer.Services
sealed class FallbackObjectWrapper : ContentControl, IVisualDesignObjectWrapper
{
DesignSite _site;
DesignItem _site;
public FallbackObjectWrapper(DesignSite site)
public FallbackObjectWrapper(DesignItem site)
{
this._site = site;
@ -59,7 +62,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services @@ -59,7 +62,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services
this.Content = site.Component;
}
public DesignSite WrappedSite {
public DesignItem WrappedSite {
get { return _site; }
}
}

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

@ -60,12 +60,13 @@ @@ -60,12 +60,13 @@
<Compile Include="DesignPanel.cs" />
<Compile Include="HashSet.cs" />
<Compile Include="Linq.cs" />
<Compile Include="ServiceRequiredException.cs" />
<Compile Include="Services\ComponentService.cs" />
<Compile Include="Services\DesignServiceContainer.cs" />
<Compile Include="Services\SelectionService.cs" />
<Compile Include="Services\ToolService.cs" />
<Compile Include="Services\VisualDesignService.cs" />
<Compile Include="XamlDesignSite.cs" />
<Compile Include="XamlDesignItem.cs" />
<Compile Include="DesignSurface.cs" />
</ItemGroup>
<ItemGroup>

15
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/XamlDesignSite.cs → src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/XamlDesignItem.cs

@ -11,12 +11,13 @@ using ICSharpCode.WpfDesign.XamlDom; @@ -11,12 +11,13 @@ using ICSharpCode.WpfDesign.XamlDom;
namespace ICSharpCode.WpfDesign.Designer
{
sealed class XamlDesignSite : DesignSite
sealed class XamlDesignItem : DesignItem
{
readonly XamlObject xamlObject;
readonly DesignSurface designSurface;
UIElement _view;
public XamlDesignSite(XamlObject xamlObject, DesignSurface designSurface)
public XamlDesignItem(XamlObject xamlObject, DesignSurface designSurface)
{
this.xamlObject = xamlObject;
this.designSurface = designSurface;
@ -30,10 +31,18 @@ namespace ICSharpCode.WpfDesign.Designer @@ -30,10 +31,18 @@ namespace ICSharpCode.WpfDesign.Designer
public override UIElement View {
get {
return null;
if (_view != null)
return _view;
else
return this.Component as UIElement;
}
}
internal void SetView(UIElement newView)
{
_view = newView;
}
public override object GetService(Type serviceType)
{
return designSurface.Services.GetService(serviceType);

10
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DefaultServiceProvider.cs

@ -62,16 +62,6 @@ namespace ICSharpCode.WpfDesign @@ -62,16 +62,6 @@ namespace ICSharpCode.WpfDesign
}
}
/// <summary>
/// Gets the <see cref="IVisualDesignService"/>.
/// This service is guaranteed to always exist -> this property will never return null.
/// </summary>
public IVisualDesignService VisualDesign {
get {
return GetServiceChecked<IVisualDesignService>();
}
}
/// <summary>
/// Gets the <see cref="ISelectionService"/>.
/// This service is guaranteed to always exist -> this property will never return null.

5
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DesignSite.cs → src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DesignItem.cs

@ -12,14 +12,15 @@ using System.Windows; @@ -12,14 +12,15 @@ using System.Windows;
namespace ICSharpCode.WpfDesign
{
/// <summary>
/// The DesignSite connects a component with the service system and the designers.
/// The DesignItem connects a component with the service system and the designers.
/// Equivalent to Cider's ModelItem.
/// </summary>
/// <remarks>
/// About the Cider extension system:
/// http://blogs.msdn.com/jnak/archive/2006/04/24/580393.aspx
/// http://blogs.msdn.com/jnak/archive/2006/08/04/687166.aspx
/// </remarks>
public abstract class DesignSite : IServiceProvider
public abstract class DesignItem : IServiceProvider
{
/// <summary>
/// Gets the component this DesignSite was created for.

24
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/EventArgs.cs

@ -13,46 +13,46 @@ namespace ICSharpCode.WpfDesign @@ -13,46 +13,46 @@ namespace ICSharpCode.WpfDesign
/// <summary>
/// Event arguments specifying a component as parameter.
/// </summary>
public class SiteEventArgs : EventArgs
public class DesignItemEventArgs : EventArgs
{
readonly DesignSite _site;
readonly DesignItem _item;
/// <summary>
/// Creates a new ComponentEventArgs instance.
/// </summary>
public SiteEventArgs(DesignSite site)
public DesignItemEventArgs(DesignItem item)
{
_site = site;
_item = item;
}
/// <summary>
/// The component affected by the event.
/// </summary>
public DesignSite Site {
get { return _site; }
public DesignItem Item {
get { return _item; }
}
}
/// <summary>
/// Event arguments specifying a component as parameter.
/// </summary>
public class ComponentCollectionEventArgs : EventArgs
public class DesignItemCollectionEventArgs : EventArgs
{
readonly ICollection<object> _components;
readonly ICollection<DesignItem> _items;
/// <summary>
/// Creates a new ComponentCollectionEventArgs instance.
/// </summary>
public ComponentCollectionEventArgs(ICollection<object> components)
public DesignItemCollectionEventArgs(ICollection<DesignItem> items)
{
_components = components;
_items = items;
}
/// <summary>
/// The components affected by the event.
/// </summary>
public ICollection<object> Components {
get { return _components; }
public ICollection<DesignItem> Items {
get { return _items; }
}
}
}

24
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Services.cs

@ -46,7 +46,7 @@ namespace ICSharpCode.WpfDesign @@ -46,7 +46,7 @@ namespace ICSharpCode.WpfDesign
/// <see cref="IVisualDesignObjectWrapper"/>,
/// or returns null to use the component itself as UIElement.
/// </returns>
UIElement CreateWrapper(DesignSite site);
UIElement CreateWrapper(DesignItem site);
}
/// <summary>
@ -58,7 +58,7 @@ namespace ICSharpCode.WpfDesign @@ -58,7 +58,7 @@ namespace ICSharpCode.WpfDesign
/// <summary>
/// Gets the design site this object was wrapping.
/// </summary>
DesignSite WrappedSite { get; }
DesignItem WrappedSite { get; }
}
#endregion
@ -109,7 +109,7 @@ namespace ICSharpCode.WpfDesign @@ -109,7 +109,7 @@ namespace ICSharpCode.WpfDesign
event EventHandler SelectionChanging;
/// <summary>Occurs after the current selection has changed.</summary>
event EventHandler<ComponentCollectionEventArgs> SelectionChanged;
event EventHandler<DesignItemCollectionEventArgs> SelectionChanged;
/// <summary>Occurs when the primary selection is about to change.</summary>
event EventHandler PrimarySelectionChanging;
@ -119,28 +119,28 @@ namespace ICSharpCode.WpfDesign @@ -119,28 +119,28 @@ namespace ICSharpCode.WpfDesign
/// <summary>
/// Gets if the specified component is selected.
/// </summary>
bool IsComponentSelected(object component);
bool IsComponentSelected(DesignItem component);
/// <summary>
/// Gets the collection of selected components.
/// This is a copy of the actual selected components collection, the returned copy
/// of the collection will not reflect future changes to the selection.
/// </summary>
ICollection<object> SelectedComponents { get; }
ICollection<DesignItem> SelectedItems { get; }
/// <summary>
/// Replaces the current selection with the specified selection.
/// </summary>
void SetSelectedComponents(ICollection<object> components);
void SetSelectedComponents(ICollection<DesignItem> components);
/// <summary>
/// Modifies the current selection using the specified components and selectionType.
/// </summary>
void SetSelectedComponents(ICollection<object> components, SelectionTypes selectionType);
void SetSelectedComponents(ICollection<DesignItem> components, SelectionTypes selectionType);
/// <summary>Gets the object that is currently the primary selected object.</summary>
/// <returns>The object that is currently the primary selected object.</returns>
object PrimarySelection { get; }
DesignItem PrimarySelection { get; }
/// <summary>Gets the count of selected objects.</summary>
/// <returns>The number of selected objects.</returns>
@ -158,18 +158,18 @@ namespace ICSharpCode.WpfDesign @@ -158,18 +158,18 @@ namespace ICSharpCode.WpfDesign
/// <returns>
/// The site of the component, or null if the component is not registered.
/// </returns>
DesignSite GetSite(object component);
DesignItem GetDesignItem(object component);
/// <summary>Registers a component for usage in the designer.</summary>
DesignSite RegisterComponentForDesigner(object component);
DesignItem RegisterComponentForDesigner(object component);
// /// <summary>Unregisters a component from usage in the designer.</summary>
// void UnregisterComponentFromDesigner(DesignSite site);
/// <summary>Event raised whenever a component is registered</summary>
event EventHandler<SiteEventArgs> ComponentRegistered;
event EventHandler<DesignItemEventArgs> ComponentRegistered;
/// <summary>Event raised whenever a component is unregistered</summary>
event EventHandler<SiteEventArgs> ComponentUnregistered;
event EventHandler<DesignItemEventArgs> ComponentUnregistered;
}
#endregion
}

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

@ -105,7 +105,7 @@ namespace ICSharpCode.WpfDesign @@ -105,7 +105,7 @@ namespace ICSharpCode.WpfDesign
/// <summary>
/// Finds the designed element for the specified original source.
/// </summary>
DesignSite FindDesignedElementForOriginalSource(object originalSource);
DesignItem FindDesignedElementForOriginalSource(object originalSource);
// The following members were missing in <see cref="IInputElement"/>, but of course

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

@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
<Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="DesignerException.cs" />
<Compile Include="DefaultServiceProvider.cs" />
<Compile Include="DesignSite.cs" />
<Compile Include="DesignItem.cs" />
<Compile Include="Services.cs" />
<Compile Include="Tools.cs" />
</ItemGroup>

Loading…
Cancel
Save