Hi ,
This is related to an error which we are tracing in Eventviewer of system by Dispatcher method while showing the values in UI in WPF application using XamDataGrid.
Error is shown as Below :
Message : PresentationException occured in App.Application_DispatcherUnhandledException, message: 'selectorArrow' name cannot be found in the name scope of 'System.Windows.Controls.ControlTemplate'., transactionID: Not available
Source :
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite :
Stack Trace : The stack trace is unavailable.
Additional Info:
Functionality is described as below :
With ViewModel Layer we are binding an list and the list is attached to the View in order to the shown the column present in the list in XamDatagrid at the presentation layer.
The column which is shown in Xamdatagrid is an Unbounded column.
While rendering over the UI , an 'Unhandled' Exception is thrown in UI and with logging the above error message.
Seeking help in order to resolve this issue.
Thanks,
Nitish
Hello Nitish,
Thank you for your post. I have been looking into it and one possible reason for getting this exception is if you copied the default Style for the RecordSelector and removed a Path called “selectorArrow” which is used in one of the defined animations. Please let me know if this helps you, if not could you please provide me with an isolated sample project where this is reproduced, so I can investigate it further for you.
Looking forward for your reply.
Hi,
Thanks for the response. Please find attached the code of View.
Here scenario is
On Check of one checkbox present in View . The next view will be open as popup hiding the previous view.
On first view we have Some items and second view consist of subitems, based on selection of item from first view.
Below is the code of Second View (On Load Of Which Error Mentioned above of 'selectorArrow' in start of this post will be logged in event viewer):
<vw:FinanceExtensionGrid x:Name="SubCompensationGrid" Grid.Row="0" Margin="5" AutomationProperties.AutomationId="FIN_SCTV_Grd_SubCompensationGrid" DataSource="{Binding Path=CoveragesList, Mode=Twoway}" GroupByAreaLocation="None" Style="{DynamicResource XamDataGrid.NormalStyle}" vw:FocusBehaviour.FocusElement="{Binding IsSubCompensationFocused}"> <vw:FinanceExtensionGrid.Resources> <!-- <Style x:Key="CheckBoxColumn" TargetType="{x:Type igDP:CellValuePresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}"> <DockPanel> <CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" IsChecked="{Binding Path=IsActive,Mode=TwoWay}" Width="20"> </CheckBox> </DockPanel> </ControlTemplate> </Setter.Value> </Setter> </Style> -->
<Style TargetType="{x:Type igDP:RecordSelector}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type igDP:RecordSelector}"> <CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" AutomationProperties.AutomationId="FIN_SCTV_Chk_IsActive" IsChecked="{Binding Path=DataItem.IsActive, Mode=TwoWay}" /> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="ToolTip" Value="{Localize FIN-VPFO-FOV-ToolTip, DefaultValue=Utrymme}" /> </Style> <!-- CoveragesList[0].IsFocused = false; --> <Style TargetType="{x:Type igDP:DataRecordPresenter}"> <Setter Property="IsSelected" Value="{Binding DataRecord.DataItem.IsFocused, Mode=TwoWay, RelativeSource={RelativeSource Self}}" /> <Setter Property="vw:FocusBehaviour.FocusElement" Value="{Binding DataRecord.DataItem.IsFocused, Mode=TwoWay, RelativeSource={RelativeSource Self}}" /> </Style> <vm:CommandReference x:Key="SpaceKeyPress" Command="{Binding Path=SpaceKeyPressCommand}" CommandParameter="{Binding ElementName=SubCompensationGrid, Path=ActiveRecord.DataItem}" /> </vw:FinanceExtensionGrid.Resources>
<igDP:XamDataGrid.InputBindings> <KeyBinding Key="SPACE" Command="{StaticResource SpaceKeyPress}" /> <!-- <KeyBinding Key="Tab" Command="{StaticResource TabReference}"></KeyBinding> --> </igDP:XamDataGrid.InputBindings>
<igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AllowFieldMoving="No" AutoGenerateFields="False" SelectionTypeRecord="Extended" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout> <igDP:FieldLayout.Fields> <!-- <igDP:UnboundField> <igDP:UnboundField.Settings> <igDP:FieldSettings CellValuePresenterStyle="{StaticResource CheckBoxColumn}"> </igDP:FieldSettings> </igDP:UnboundField.Settings> </igDP:UnboundField> --> <igDP:UnboundField Name="ClaimCoverageDescription" BindingMode="TwoWay" BindingPath="ClaimCoverageDTO.ClaimCoverageDescription" Label="{Localize FIN-RES-HDR-SelectCoveragesScreen, DefaultValue=Compensation Coverages}"> <igDP:UnboundField.Settings> <igDP:FieldSettings AllowEdit="False" CellClickAction="SelectRecord" KeyboardNavigation.IsTabStop="False" KeyboardNavigation.TabNavigation="None" LabelWidth="400" /> </igDP:UnboundField.Settings> </igDP:UnboundField> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </vw:FinanceExtensionGrid>
where vw : represents the Instance of View Model.
Please let me know where code is missing configuration for 'selectorArrow' element.
Also , If I am running the Code through Debugging Mode , then there is no such exception which we are facing. It is only through the release mode or Dettached mode from the solution. Is the error is related to any Dispatcher thread or something ? I am just pretending it by seeing the error.
Please help us so that we can go for the resolution of it. Thanks for your attention :) .
Regards,
I have been looking into your code, but without an isolated sample project where this is reproduced, I am not able to conclude what can cause your behavior, so could you please send me such sample, so I could be able to investigate this further for you? Also it will be very helpful if you tell me the steps I need to follow in order to reproduce your behavior.
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.