I'm sure I'm not in the right forum, but this appears to be the only one I am able to post in.
I am using XamGrid, and when I add a ConditionalFormattingSetting of AllowConditionalFormatting=True, I get the below exception in the debug window. (The conditional formatting does work, however.)
A first chance exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll
If I set AllowConditionalFormatting="False", I do not get the exception. Thoughts? Code is below (Resources not shown).
<ig:XamGrid x:Name="JobsGrid" AutoGenerateColumns="False"> <ig:XamGrid.ConditionalFormattingSettings> <ig:ConditionalFormattingSettings AllowConditionalFormatting="True" /> </ig:XamGrid.ConditionalFormattingSettings> <ig:XamGrid.Columns> <ig:TextColumn Key="JobType" Width="100" /> <ig:TextColumn Key="JobName" HeaderText="Job" Width="100" /> <ig:TextColumn Key="Status" Width="80"> <ig:TextColumn.ConditionalFormatCollection> <ig:EqualToConditionalFormatRule Value="InProgress" StyleToApply="{StaticResource StatusGreen}" /> <ig:EqualToConditionalFormatRule Value="Unstarted" StyleToApply="{StaticResource StatusRed}" /> </ig:TextColumn.ConditionalFormatCollection> </ig:TextColumn> </ig:XamGrid.Columns></ig:XamGrid>
Hello Aline,
Thank you for your post. I have been trying to reproduce your issue without success. I am attaching a sample application(XamGridConditionalFormattingIssue.zip) that I have used for my tests. Please modify it or attach your own sample application in order to provide you with more accurate assistance.
Looking forward to hearing from you.
Hi, when I run your sample in VS2010 I do not get the exception, but when I run your sample in VS2012 I get the same exception that I get in my own project. What happens on your side when you run your sample in VS2012?
Hi Aline,
I have been looking into your question and when I run the application with Visual Studio 2012, no exception appears. Would you please tell us the version of our assembly files that you are using like e.g. 12.2.20122.2089 ?
Hi Yanko,
I am on 12.2.20122.2089.
Thanks,
Aline
Thank you for your reply. I have tested my sample application with Visual Studio 2012 on two machines and no exception appears. Please tell me the operation system that you are using in order to reproduce the issue that you are having. Also if possible try to test the sample on another machine.
Hello,
I am using Windows 7 Professional.
I do not have another development machine, so I will just assume this exception is harmless and ignore it.
Aline,
I was able to reproduce a first chance InvalidOperationException with the sample that Dimi provided in this thread using Visual Studio 2010. The exception that I do see is wrapped within a try catch and is harmless so you should be able to safely ignore it.
Note that I would expect the same behavior when debugging with Visual Studio 2010 and Visual Studio 2012. There are a few options in Visual Studio that would affect if you break on first chance exceptions. One is having the thrown checkbox checked on the exception dialog for common language runtime exceptions. The second is in the general debugging options and is whether "Enable Just My Code" is checked. If this is checked, the debugger will not break for first chance exceptions unless you have the debug symbols for the relevant assemblies loaded.
Let me know if you have any questions with this matter.