This repository was archived by the owner on Oct 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 788
changed implementation of PanelSelectionHandler so that custom panelsele... #521
Merged
siegfriedpammer
merged 75 commits into
icsharpcode:master
from
gumme:WpfDesignerPartialPanelSelectionHandler
Aug 23, 2014
Merged
changed implementation of PanelSelectionHandler so that custom panelsele... #521
siegfriedpammer
merged 75 commits into
icsharpcode:master
from
gumme:WpfDesignerPartialPanelSelectionHandler
Aug 23, 2014
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ignItemProperty.CollectionElements.
…type defines a Content property.
…n declaring a property as XAML element, and NOT the name of the type that declares the property.
…pile whole SharpDevelop solution before loose referenced projects can compile.
…declared in the document root. As prefix for the XML-namespaces it primarily uses the value from XmlnsPrefixAttribute if it exists for the XML-namespace, otherwise a "ControlsX" name is generated, where X is the first free value.
… that really represents attached properties when an attached property is used. When setting a property value as attribute, fixed so namespace prefix is only used for attached properties, and if no prefix is defined for a non-default namespace a new unique prefix is generated.
…ss will be executed. Made some modifications to XamlParser so it aligns with the official XamlReader and the SimpleLoadTests will pass.
…ss will be executed. Made some modifications to XamlParser so it aligns with the official XamlReader and the WhitespaceTests will pass.
…rgetObject (for example when adding Bindings to the MultiBinding.Bindings property).
…the document failed to load completely.
… type string named Name to represent a name in XAML namescope, and this caused trouble with types with a property named Name that did not represent a XAML name. In this case the value of the property tried to be registered as name to the namescope and this caused either the value to be occupied as name, or threw an exception if name already was taken or the value consisted of characters forbidden in XAML names causing the value to not be set at all. To solve this the value of a Name property is only registered to namescope if the property represents a XAML name (defined by RuntimeNamePropertyAttribute). Also added a Name property to XamlObject that always sets the name to x:Name attribute, but gets it from either x:Name or the property that represents the XAML name if it exists (both are valid places for name registration). Fixed a bug in XamlParser where x:Name value was not registered in its namescope. All other changes (for example changes in PropertyGrid/XamlDesignItem) was to support the Name fixes described above.
… instead of a NullReferenceException in the case where the document failed to load.
… attribute that does not belong to a namespace, otherwise it will overwrite the value in another attribute with same name but in another namespace if it finds one.
…on types outside default XAML namespace. Fixing this in CreatePropertyElement method also fixed another bug for AddChildNodeToProperty method that was fixed earlier in InsertNodeInCollection method with commit comment as follows: "Its WPF standard to use parent type name as prefix before the dot when declaring a property as XAML element, and NOT the name of the type that declares the property."
…t to compile whole SharpDevelop solution before loose referenced projects can compile." This reverts commit ad869ad.
This is necessary after the fix in commit 295f625. Before that commit the ReportErrors was semi-optional; When loading was successful ReportErrors was never called (ReportErrors optional), but when document failed to be created a NullReferenceException was thrown because ReportErrors did not have a delegate. See also commit 006558f, that throws a more friendly exception than NullReferenceException when document fails to load.
…signItemProperty and that it writes as expected to XAML.
…ons. In either case, prefix should not be used for a normal property in markup extensions.
…checks if the referenced resource is declared locally, and it its declared locally it forces the markup extension to be printed as element and not as shorthand XAML markup extension code. This is so the StaticResource can find the correct resource. Also fixed so Resources element is always left first among the child elements when inserting new child.
…ed after the markup extension was set on a property, and these property changes effect how the markup extension can be printed in XAML, the markup extension was not updated properly.
Conflicts: src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/PropertyGrid.cs src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlDesignContext.cs src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/NameScopeHelper.cs src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/WpfDesign.XamlDom.csproj src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlConstants.cs src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlDocument.cs src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlObject.cs src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlTypeFinder.cs src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/PropertyGrid/PropertyNode.cs All conflicts resolved using remote version of the files.
…f they are already present in the root where the snippet is pasted. Added a test "PasteCustomControlUsingMixedTypes" that failed before this fix.
This reverts commit 5bdc1ac.
Conflicts: src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj
Conflicts: src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs
Conflicts: src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/SizeDisplay.cs src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/WpfDesign.Designer.csproj
…iveTypesConversion'
…electionhandlers can inherit that class if they are built in the same project. Also added a Partial Selectionhandler that selects objects that are partially selected if both mousebuttons are pressed. PartialPanelSelectionHandler is activated by adding a custom extension in your project like this: [ExtensionFor(typeof(Panel), OverrideExtension = typeof(PanelSelectionHandler))] public class CustomPartialPanelSelectionHandler : PartialPanelSelectionHandler { }
…PartialPanelSelectionHandler
I think you made some mistakes in this Pull req! Or do you really want to change 41 Files, even many of them have nothing to do with WPF Designer? |
Sorry, that is correct I do not want to alter 41 files. I have reverted the unwanted changes so the request should be correct now |
what do you do in your project with the CustomPartialPanelSelectionHandler? |
siegfriedpammer
added a commit
that referenced
this pull request
Aug 23, 2014
…ndler changed implementation of PanelSelectionHandler so that custom panelsele...
Note: because the merge included the history of the unrelated commits that were accidentally included in this request; I un-did the merge using a force push. |
dgrunwald
added a commit
that referenced
this pull request
Aug 23, 2014
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
...ctionhandlers can inherit that class if they are built in the same project. Also added a Partial Selectionhandler that selects objects that are partially selected if both mousebuttons are pressed.
PartialPanelSelectionHandler is activated by adding a custom extension in your project like this:
[ExtensionFor(typeof(Panel), OverrideExtension = typeof(PanelSelectionHandler))]
public class CustomPartialPanelSelectionHandler : PartialPanelSelectionHandler
{
}