Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: Extended WPF Toolkit PropertyGrid crashes when SelectedObject set to System.Windows.Shapes type. [21384]

$
0
0
I was having problems getting the PropertyGrid to work properly with nested classes and the ExpandableObject attribute so I started with a clean project and found that when the SelectedObject property is set to Ellipse(), or any other object deriving from System.Windows.Shapes, an exception is thrown: "An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in PresentationFramework.dll". This occurs with Ellipse, Rectangle, and all the other Shapes. Other types deriving from UIElement and onward seem to work fine.

In order to eliminate other sources of error, I created a new WPF solution, with just the top-level `MainWindow' class. In code, I wrote:

Window w = new Window(); // The PropertyGrid container.
w.Owner = MainWindow;
Xceed.Wpf.Toolkit.PropertyGrid.PropertyGrid propertyGrid = new Xceed.Wpf.Toolkit.PropertyGrid.PropertyGrid();
w.Content = propertyGrid;
propertyGrid.SelectedObject = new System.Windows.Shapes.Ellipse();
w.ShowDialog(); // Here is where the exception occurs.

Setting the SelectedObject property to anything else other than a Shape, while the other code remains the same, does not cause the exception. Any direction would be greatly appreciated.

Platform Info:

Windows 7, SP1
.NET 4.5
Visual Studio Express 2012
Extended WPF Toolkit: v2.2.1
Comments: ** Comment from web user: BoucherS **

Hi,[0A][0A]This issue should be fixed in v2.3.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>