Git Product home page Git Product logo

wpfdesigner's Introduction

WpfDesigner

The WPF Designer from SharpDevelop, available via NuGet

Overview

WpfDesigner is a set of assemblies which can be included in your project to implement a XAML GUI editor.

Project Build Status

Branch Status
master (Development) Build

System Requirements

.NET 4.5, or .NET Core 5.0 as well as .NET 6.0

Libraries and Integrated Tools

Only the sample app has dependencies:

Sample App

Sample App

Copyright 2015-2019 AlphaSierraPapa for the SharpDevelop team. SharpDevelop is distributed under the MIT license.

wpfdesigner's People

Contributors

awraae avatar boelew avatar christophwille avatar dgrunwald avatar jogibear9988 avatar lukeomp avatar mathewsachin avatar maxpatyk avatar siegfriedpammer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wpfdesigner's Issues

Selection Handling on Design Surface

i'm using this code to change SelectionChanged handler on DesignSurface

 designSurface.DesignContext.Services.Selection.SelectionChanged += delegate
            {
                   var selection = designSurface.DesignContext.Services.Selection.SelectedItems.First().Component ;
                   CommandManager.InvalidateRequerySuggested();
            };

i feel like its wrong what is the correct way to do this in DesignSurface ?
i need to get data from Selected Item but its not DesignItem , i've Added My own Control to it

GridSplitter For Sticking Components

in DesignSurface there is one horizontal and vertical splitter in middle of page , which controls sticking to them i want 4 of those guys,which can be resized here is my wrong code :)

            Engine1.DynamicGrid.NumRows = int.Parse(FormXML.Attribute("ROWS").Value.ToString().Split('*').First());
            //Engine1.DynamicGrid.NumRows = 4;
            Engine1.DynamicGrid.NumRows += Engine1.DynamicGrid.NumRows - 1;
            Engine1.DynamicGrid.NumColumns = int.Parse(FormXML.Attribute("COLS").Value.ToString().Split('*').First());
            //Engine1.DynamicGrid.NumColumns = 4;
            Engine1.DynamicGrid.NumColumns += Engine1.DynamicGrid.NumColumns - 1;
            //Engine1.DynamicGrid.ShowGridLines = true;
            for (int i = 0; i < Engine1.DynamicGrid.NumColumns; i++)
            {
                if (i % 2 != 0)
                {
                    //gridcolumnsplitteradorner or gridrowsplitteradorner
                    //designerSurface.dsingnpanel.adornerlayer =>  adornerpanel.children.add(splitter);
                    //gridadornerprovider.splitterlist.add(splitter);


                    GridSplitter gs = new GridSplitter();
                    gs.ResizeDirection = GridResizeDirection.Columns;
                    gs.Width = 3;
                    gs.HorizontalAlignment = HorizontalAlignment.Stretch;
                    Grid.SetColumn(gs, i);
                    Grid.SetRowSpan(gs, Engine1.DynamicGrid.NumRows);
                    Engine1.DynamicGrid.Children.Add(gs);
                }

            }
            for (int j = 0; j < Engine1.DynamicGrid.NumRows; j++)
            {
                if (j % 2 != 0)
                {
                    GridSplitter gs = new GridSplitter();
                    gs.ResizeDirection = GridResizeDirection.Rows;
                    gs.ShowsPreview = true;
                    gs.Height = 3;
                    gs.HorizontalAlignment = HorizontalAlignment.Stretch;
                    Grid.SetRow(gs, j);
                    Grid.SetColumnSpan(gs, Engine1.DynamicGrid.NumColumns);
                    Engine1.DynamicGrid.Children.Add(gs);
                }

            }

            RootItem.Children.Add(Engine1.DynamicGrid);

Adding binding option for events

What I am intend to do: if I open context menu on events section of property grid, there will be set binding option, which will do following if clicked - will add attached property to element.
For example. If I try to add binding to Loaded event of Grid, following will be added to Text

<i:Interaction.Triggers>

   <i:EventTrigger EventName="Loaded">
      <cmd:EventToCommand Command="{Binding Mode=OneWay, Path=LoadedCommand}"
                          PassEventArgsToCommand="True" />
    </i:EventTrigger>
  </i:Interaction.Triggers>

and these to declaration of window.

    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Platform"

I am actually on it, but haven't completed "research" of code, and understand if it possible to insert corresponding text as child to parent element.

WPF Designer ToDo's

  • Rework Rotating/Skewing (maybe use Code from https://github.com/jogibear9988/transformbox (MIT))
  • Drag Controls to Transparent Containers
  • DesignTime Collection Editor should support NewItemTypes Attribute (maybe we need to support DesignTimeDlls)
  • StaticResourceExtension should use IAmbientProvider instead of a Wrapper.
  • Snapline support for SameDistance as another Object has
  • Change "ValueOnInstance" so that changes in DesignWidth do not change "Width" in property Grid
  • Paste should use actual Position as upper offset (so the inserted Elements are not out of Screen)
  • Snap Line/Path/Polyline Edit in 15° (like Blend)
  • Check that Line/Path/Poline Edit also works in Grid, not only Canvas
  • Snapline and Rasterplacement should be used while Editing Lines/Path/Polyline (skip with Ctrl)
  • Better way to Add Points to Line/Path/Polyline
  • Support of Line/Path/Polyline Edit when zoomed
  • Rework Keyboard modifiers (should be same Blend uses)

Element constant rotation

If you select an element and click on the rotation handle and move your mouse to the right, the element starts rotate constantly and fast.
Is that a normal behavior? can that be stopped or adjusted?

Memory Leak in PropertyGrid when Rearranging Controls

Hello,
I think I found a memory leak. Here are the steps to reproduce it on Demo.XamlDesigner:

  • run Demo.XamlDesigner app
  • in the XAML tab, paste the following code:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Width="640"
        Height="480">
  <Canvas>
    <TabControl Width="304"
                Height="167"
                Canvas.Left="72"
                Canvas.Top="132">
      <TabItem />
      <TabItem />
      <TabItem />
      <TabItem />
      <CheckBox />
    </TabControl>
    <CheckBox Canvas.Left="157" Canvas.Top="233.04000000000002" />
    <CheckBox Canvas.Left="242" Canvas.Top="208" />
    <CheckBox Canvas.Left="157" Canvas.Top="173.04000000000002" />
    <CheckBox Canvas.Left="234" Canvas.Top="158" />
    <CheckBox Canvas.Left="116" Canvas.Top="208" />
  </Canvas>
</Window>
  • switch to Design view
  • in the outline panel, drag and drop the tab items and check boxes onto each other randomly
  • see the process memory consumption increase

Here is the screen recording video of this process.

If you comment out the PropertyGrid.Reload method body, the problem seems to disappear. This this might be PropertyNode - related. However, I was unable to track down the object retention problem to fix it.

Adding attached property breaks "Design" mode

Hi. It is not critical issue, I find "hacky" solution for this, but it is curious why this happens. The problem is if I add attached property to something programmaticly or in "XAML" mode (event trigger in my example), switching to "Design" mode not updates document, i mean it is still in "XAML" mode. I tried to find if generated window becomes null or some inner exception happens, but nothing, window is generated, and all functions act normal. Added example xaml as file.

New1.txt

Way to render custom UserControl

Hi,

is there a way to render custom UserControls?
I experience the problem that there won't be thrown an exception when wrapping for example a "Grid" within a "UserControl" but it's not displayed in the designer. Whenever I remove the UserControl, so the Grid is the root element, then the grid and it's button content will be rendered/displayed.

Properties of Component bound to directly not reflected in DesignItem.Properties

So I get why changes made directly to the Component's Properties dont propagate back into the DesignItem Properties wrapper, but is there any other way for changes to be reflected? I am trying to bind a couple additional controls to attached properties of a UI Element I am drawing, but since I am not binding directly to the accessors (nor do I think that is possible) the changes do not make their way into the xaml.

Changed event

Does the designer have any event that will fire when any change is made to the designer?
I simply want to update my text/code editor as soon as the anything in the designer changes.
I've looked and haven't found anything so far.

Designer not updating

Context:
The design surface and the xaml editor are both in the same grid split by a splitter.
When xaml changes TextChanged fires and loads the designer using LoadDesigner method.
However nothing seems to be happening, the designer only updates when I click anywhere in the designer.
What can I do force the designer to update when the xaml changes?
Thanks.

DragAndDrop support for DataFormats.FileDrop in designer?

From what I can tell there is already a bunch of support in place for drag and drop functionality. I would like to expand on this for the purpose of being able to drag a file, such as a jpg, onto the design surface and have it create an Image element with the source set to my dragged file.

Due to protection levels of a couple sealed classes I am unable to just "overrule" the current drag-drop functionality, so how would I go about this?

Error when parsing XAML with a line in it

I get an error when trying to parse the XAML this creates when I have a line in the markup. Path, rectangle etc all seem fine, but as soon as I draw a line it throws the following error:

System.Xaml.XamlObjectWriterException
HResult=0x80131500
Message=Set property 'System.Windows.FrameworkElement.Margin' threw an exception.
Source=System.Xaml
StackTrace:
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, > Object value)
Inner Exception 1:
ArgumentException: 'Auto,Auto,0,0' is not a valid value for property 'Margin'.

For reference, the code I am using to parse the XAML is:

        var sb = new StringBuilder();
        using (var xmlWriter = new XamlXmlWriter(sb))
        {
            designSurface.SaveDesigner(xmlWriter);
        }
        var xamlCode = sb.ToString();

        UIElement rootElement;
        rootElement = (UIElement)XamlReader.Parse(xamlCode);

Width of the window when you run test isn't proportional

When i'm created my window in XamlDesigner and go to Test->run, width of the window is bigger than in XamlDesigner.
For example:
default width is 640 and height is 480
when i run test first time width is bigger than 640, then i close the window
and change width to 641, and back to 640, and then i run again, and the window is ok.

WPF Brush Editor improvements

When a WPF Brush is used, the Name should be written to XAML, not the Hex Value, like Blend does it!

And when a SystemBrush is used maybe we should create a Binding istead of using the Value, but this needs to be discussed!

(moved from icsharpcode/SharpDevelop#663)

Bug/Improvement: Drawing a element on top of an existing element that does not have a content property.

The standard way VS handles drawing a new element on top of something that doesn't have a content property, say like a image on top of an image, is that vs will craw up the hierarchy until it finds a element that does and add it to that.

For instance if i have:

grid
|_ Image (stretched to the full size of grid)

and i try to draw a new element it wont let me, I have to draw it elsewhere then drag it in, when in reality it should attach it to the grid.

Sharp Develop 5.0 und Extended WPF Toolkit

see: http://community.sharpdevelop.net/forums/t/22398.aspx

Habe nochmal nachgeschaut. Es braucht tatsächlich die Using -Anweisung "using Xceed.Wpf.Toolkit;". Hat halt andere Probleme, weil man Standards wie "MessageBox" jetzt voll-qualifiziert angeben muss (also z.B. "System.Windows.MessageBox", wenn ein Element jetzt AUCH in der Extended WPF Toolbox enthalten ist.

Löst aber nicht das Problem, dass die Entwiclungsumgebung abstürzt!

Hallo

ich habe jetzt die Version 5.0 installiert und festgestellt, dass Elemente des Extended WPF Toolkits nicht mehr funktionieren.

Und zwar wie folgt:

im Design Fenster wird das Element nicht mehr angezeigt, wenn es vorhanden ist, aber im Programm funktioniert es.

Das Anlegen eines Elements (ziehen auf das Design-Fenster) stürzt die Entwicklungsumgebung ab.

Ich habe unter Referenzen die Version gelöscht und Extended WPF Toolkit (aktuelle Version, Download am 19.11) neu als Referenz hinzugefügt.

Ist es ein Fehler oder was könnte ich falsch machen? (Unter 4.3 hatte es funktioniert und im Visual Studio 2103 funktioniert es noch)

Oder soll ich auf 4.3 zurück gehen?

Improve documentation

Hi,

I want to use this control and integrated it using nuget. But, I can't find how to use it. It would be nice to add a small documentation about how to use it and about the most appropiate features it provides.

New feature needed: Specifying Properties

Hi
First of all, thank you for the project you provided.
I create a new usercontrol and I want to hide all inherit properties in PropertyGrid. Browsable is one option, but it is not convenient for hiding all inherit properties. Referring the similar project wpftoolkit, its PropertyGrid can hide all properties by using AutoGenerateProperties at one time. Can you add this feature?

Wating for your reply.
Thanks

source code reference: ObjectContainerHelper.cs

usage description

Application freezes on element selection

Steps to reproduce:

  1. New WPF project and reference nuget package.
  2. In MainWindow:
<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1"
        xmlns:design="http://sharpdevelop.net"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <design:DesignSurface x:Name="designSurface" ></design:DesignSurface>
    </Grid>
</Window>
  1. In the main window constructor:
using (var xmlReader = XmlReader.Create(@"C:\temp\NewFileTemplate.xaml"))
 {
                designSurface.LoadDesigner(xmlReader, new XamlLoadSettings());
 }
  1. The XAML file:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="640" Height="480">
    <Grid>
		<Button Content="test" Height="20" Width="73"></Button>
	</Grid>
</Window>
  1. Run the application and select "test" button.
    There the entire application freezes, and when using the source I pause and I can see it's actually stuck in AdornerPanel.cs line 137.

Am I doing something wrong here?
You're help is greatly appreciated.

PS. something went wrong with my other account, so had to close the other issue.

GradientSlider's GradientStop can not be repositioned.

The only working solution that has worked for me is following workaround in function thumb_DragDelta. . When dragged element is moved verticaly more than 50px It deleted. It allows to user insert new GradientStop to new position.

       void thumb_DragDelta(object sender, DragDeltaEventArgs e)
       {
           var stop = (e.OriginalSource as GradientThumb).GradientStop;
           if (e.VerticalChange > 50 && GradientStops.Count > 2)
           {
               GradientStops.Remove(stop);
           }
       }

image

DesignPanel Unwanted Enlargement

moving DesignItem to top-left Corner of DesignSurface will make DesignPanel Bigger that is so Annoying . could we completely disable it?

Xaml Designer - edit polyline points not possible

It's not possible to edit points of a polyline.

image

image

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Width="640"
        Height="480">
  <Canvas>
    <Path Width="120"
          Height="100"
          Stretch="None"
          Stroke="Black"
          StrokeThickness="2"
          Canvas.Left="120"
          Canvas.Top="204.04000000000002" />
    <Polyline Points="0,0 93,69 -4,124 -4,124 -4,124"
              Stretch="None"
              Stroke="Black"
              StrokeThickness="2"
              Canvas.Left="124"
              Canvas.Top="119.03999999999999" />
  </Canvas>
</Window>

NullReferenceException in ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.TimeSpanEditor.NumberEditor_DataContextChanged

when using a MediaElement, I get the following exception whenever I try to select the control in the design view.

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.TimeSpanEditor.NumberEditor_DataContextChanged(Object sender, DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)
at System.Windows.FrameworkElement.OnDataContextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperty(TreeChangeInfo info, DependencyObject d, FrameworkObject& fo, DependencyProperty dp, FrameworkPropertyMetadata fMetadata, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperties(TreeChangeInfo info, FrameworkElement fe, FrameworkContentElement fce, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
at System.Windows.FrameworkElement.InvalidateTreeDependentProperties(TreeChangeInfo parentTreeState, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState)
at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info, Boolean visitedViaVisualTree)
at System.Windows.DescendentsWalker1.StartWalk(DependencyObject startNode, Boolean skipStartNode) at MS.Internal.PrePostDescendentsWalker1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
at System.Windows.FrameworkElement.OnVisualParentChanged(DependencyObject oldParent)
at System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent)
at System.Windows.Media.Visual.AddVisualChild(Visual child)
at System.Windows.FrameworkElement.set_TemplateChild(UIElement value)
at System.Windows.Controls.ContentPresenter.UseContentTemplate.BuildVisualTree(FrameworkElement container)
at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate) at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField1 templateDataField, FrameworkElement container)
at System.Windows.FrameworkElement.ApplyTemplate()
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.StackPanel.StackMeasureHelper(IStackMeasure measureElement, IStackMeasureScrollData scrollData, Size constraint)
at System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.VirtualizingStackPanel.MeasureChild(IItemContainerGenerator& generator, IContainItemStorage& itemStorageProvider, IContainItemStorage& parentItemStorageProvider, Object& parentItem, Boolean& hasUniformOrAverageContainerSizeBeenSet, Double& computedUniformOrAverageContainerSize, Double& computedUniformOrAverageContainerPixelSize, Boolean& computedAreContainersUniformlySized, Boolean& hasAnyContainerSpanChanged, IList& items, Object& item, IList& children, Int32& childIndex, Boolean& visualOrderChanged, Boolean& isHorizontal, Size& childConstraint, Rect& viewport, VirtualizationCacheLength& cacheSize, VirtualizationCacheLengthUnit& cacheUnit, Boolean& foundFirstItemInViewport, Double& firstItemInViewportOffset, Size& stackPixelSize, Size& stackPixelSizeInViewport, Size& stackPixelSizeInCacheBeforeViewport, Size& stackPixelSizeInCacheAfterViewport, Size& stackLogicalSize, Size& stackLogicalSizeInViewport, Size& stackLogicalSizeInCacheBeforeViewport, Size& stackLogicalSizeInCacheAfterViewport, Boolean& mustDisableVirtualization, Boolean isBeforeFirstItem, Boolean isAfterFirstItem, Boolean isAfterLastItem, Boolean skipActualMeasure, Boolean skipGeneration, Boolean& hasBringIntoViewContainerBeenMeasured, Boolean& hasVirtualizingChildren)
at System.Windows.Controls.VirtualizingStackPanel.MeasureOverrideImpl(Size constraint, Nullable1& lastPageSafeOffset, List1& previouslyMeasuredOffsets, Nullable1& lastPagePixelSize, Boolean remeasure) at System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.VirtualizingStackPanel.MeasureChild(IItemContainerGenerator& generator, IContainItemStorage& itemStorageProvider, IContainItemStorage& parentItemStorageProvider, Object& parentItem, Boolean& hasUniformOrAverageContainerSizeBeenSet, Double& computedUniformOrAverageContainerSize, Double& computedUniformOrAverageContainerPixelSize, Boolean& computedAreContainersUniformlySized, Boolean& hasAnyContainerSpanChanged, IList& items, Object& item, IList& children, Int32& childIndex, Boolean& visualOrderChanged, Boolean& isHorizontal, Size& childConstraint, Rect& viewport, VirtualizationCacheLength& cacheSize, VirtualizationCacheLengthUnit& cacheUnit, Boolean& foundFirstItemInViewport, Double& firstItemInViewportOffset, Size& stackPixelSize, Size& stackPixelSizeInViewport, Size& stackPixelSizeInCacheBeforeViewport, Size& stackPixelSizeInCacheAfterViewport, Size& stackLogicalSize, Size& stackLogicalSizeInViewport, Size& stackLogicalSizeInCacheBeforeViewport, Size& stackLogicalSizeInCacheAfterViewport, Boolean& mustDisableVirtualization, Boolean isBeforeFirstItem, Boolean isAfterFirstItem, Boolean isAfterLastItem, Boolean skipActualMeasure, Boolean skipGeneration, Boolean& hasBringIntoViewContainerBeenMeasured, Boolean& hasVirtualizingChildren) at System.Windows.Controls.VirtualizingStackPanel.MeasureOverrideImpl(Size constraint, Nullable1& lastPageSafeOffset, List1& previouslyMeasuredOffsets, Nullable1& lastPagePixelSize, Boolean remeasure)
at System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at StatScreen.App.Main()

This only happens when selecting an already placed control, not when drawing or editing it initially. Must click out then back in.

can't add same control

I can't add same control twice.
For example:
when i add button, and i want to add another button, i can't. I must add some other control before add button again.

Why can't I open it with VS2019

I clone the latest WpfDesigner code, then use VS 2019 to open the WpfDesign.sln, but I can't open it. Could you please tell me how to open it?

ResourceDictionary as Root Element does not work

If you have a ResourceDictionary as a Root element, it does not work, because "ParseObjectContent" does not find a "collectionProperty" because it does not have a parent object. Look how we can fix this!

Edit New issue WPF Designer Line/Polyline Handler Todo's

It's only a remarker for me.

  • Snap Line in 15° Steps like Expression Blend does
  • Look that Line Resizement also works in Grid, and also Line drawing

most is done for Path, Line, Polyline and PolyBezier need to be converted to use the same mechanics

  • Snapline and Raster Placment should be used for snaping during Line Resize, when Ctrl Pressed it should be ignored
  • Support for Path, and also allow Change of Bezier Curves like XDraw does
  • Good way to support adding new Points in a Polyline, Polygon, Path
  • Support for drawing PolyLine, Polygon & Path when Zoomed
  • Rework the Keyboard modifiers

Bugs, ToDo's :

Todo's in the WPF Designer

  • Changing size of a Rotated/Skewed Control not working corretly (maybe use code from https://transformbox.codeplex.com/ is under MIT Licence)
  • Rotateing Extension buggy
  • Controls could not be draged into Transparent Control
  • Design Time Collection Editor should support newItemTypes Attribute (for this we maybe need also support of Design Time DLLs)
  • Support for Line, Path, ... maybe use Code from XDraw (https://xdraw.codeplex.com), it's also MIT Licenced
  • StaticResourceExtension should use IAmbientProvider instead of a Wrapper.
  • Bindings should be changed when they copied, and the Bound Element is also copied
  • Image Control with no Image and no Size Set does not work correctly in Canvas and Grid!
  • Support for DesignHeight/Width
  • AvalonDock2 Child Elements are not Displayed in the Outline View, why? It's working in VS!
  • Sometimes Copy&Paste adds Extra Namespaces wich already exist in the XAML file

memory leak

I find something memory leak when i call UnloadDesigner inDesignSurface

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.