From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-12-2013 12:16 PM
Hello,
I'm using GraphInteractionPalette in my C# WPF application and wanted to report an exception that is being logged to the debug window. This exception is not being thrown, so I assume the control is handling it, but I'm not sure if it's something to be concerned about.
The following exception is thrown 9 times (I assume one for each button on the palette):
System.Windows.Data Error: 23 : Cannot convert '<null>' from type '<null>' to type 'System.Windows.Media.ImageSource' for 'en-US' culture with default conversions; consider using Converter property of Binding. NotSupportedException:'System.NotSupportedException: ImageSourceConverter cannot convert from (null). at System.ComponentModel.TypeConverter.GetConvertFromException(Object value) at System.Windows.Media.ImageSourceConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) at MS.Internal.Data.DefaultValueConverter.ConvertHelper(Object o, Type destinationType, DependencyObject targetElement, CultureInfo culture, Boolean isForward)'
My XAML contains the GraphInteractionPalette:
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal" VerticalAlignment="Center" Margin="5"> <ni:GraphInteractionPalette x:Name="_graphInteractionPalette" VerticalAlignment="Center"/> ... </StackPanel>
And I assign the Graph in code-behind:
_graphInteractionPalette.Graph = _graph;
The exception is thrown when the control is loaded. All the palette buttons work, but just wanted to see if I'm missing something.
Thanks!
04-12-2013 03:30 PM
Thank you for the report. The "System.Windows.Data Error" text indicates that these errors occur during binding: it appears that the image paths in the default template for the graph tool palette are evaluating to null
before receiving their final value. As you noted, this does not effect the runtime functionality or appearance of the control, but I have created a task to look at fixing the binding errors and avoid polluting the output window.
03-26-2014 04:28 AM
Is the task for solving this problem still open?
Look at http://stackoverflow.com/questions/5399601/imagesourceconverter-error-for-source-null for a solution.
03-26-2014 08:24 AM
Thank you for the link! I have added it to the notes for the task.
08-11-2015 11:03 AM
Just wanted to let you know this issue (#402863) was fixed in the Measurement Studio 2015 release.