Hi,
using XamDataGrid I get the following error: "Recursive call to Automation Peer API is not valid"
What I can say at the moment is, that this happens only on some Win XP machines.
What I do is the following:
During runtime I add a new tab to XamTabControl. The content of that tab is a view containing a XamDataGrid.
Stacktrace:
at System.Windows.Markup.XamlReader.RewrapException(Exception e, Uri baseUri) at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter) at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter) at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField) at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren) at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate) at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 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.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at Infragistics.Windows.Controls.CardPanel.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at Infragistics.Windows.DataPresenter.DataItemPresenter.MeasureOverride(Size availableSize) at Infragistics.Windows.DataPresenter.CellValuePresenter.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at Infragistics.Windows.DataPresenter.VirtualizingDataRecordCellPanel.TryGetPreferredExtent(FieldLayoutItemBase fieldLayoutItem, Boolean cell, Boolean width, Double& extent) at Infragistics.Windows.DataPresenter.CellLayoutItem.GetSize(LayoutItemSize size) at Infragistics.Windows.DataPresenter.LayoutItem.Infragistics.Controls.Layouts.Primitives.ILayoutItem.get_PreferredSize() at Infragistics.Controls.Layouts.Primitives.GridBagLayoutManager.GridBagConstraintCache..ctor(ILayoutItem item, IGridBagConstraint gc) at Infragistics.Controls.Layouts.Primitives.GridBagLayoutManager.GetGridBagCacheHelper(GridBagConstraintCache[]& tmpGccArr) at Infragistics.Controls.Layouts.Primitives.GridBagLayoutManager.CalculateGridBagLayout() at Infragistics.Controls.Layouts.Primitives.GridBagLayoutManager.CalculatePreferredSize(ILayoutContainer container, Object containerContext) at Infragistics.Windows.DataPresenter.FieldGridBagLayoutManager.CalculatePreferredSize() at Infragistics.Windows.DataPresenter.VirtualizingDataRecordCellPanel.MeasureOverride(Size availableSize) 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 Infragistics.Windows.Controls.CardPanel.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at Infragistics.Windows.DataPresenter.DataRecordCellArea.MeasureOverride(Size availableSize) 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 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.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at Infragistics.Windows.Controls.CardPanel.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at Infragistics.Windows.DataPresenter.RecordPresenter.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateNextElement(Boolean isHeader) at Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateRecordsHelper() at Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateTopFixedRecords() at Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateAllRecords() at Infragistics.Windows.DataPresenter.GridViewPanelFlat.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.ContextLayoutManager.UpdateLayout() at System.Windows.UIElement.UpdateLayout() at Infragistics.Windows.Automation.Peers.XamTabControlAutomationPeer.GetChildrenCore() at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren() at System.Windows.Automation.Peers.AutomationPeer.GetChildren() at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent) at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent) at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent) at System.Windows.Automation.Peers.AutomationPeer.ValidateConnected(AutomationPeer connectedPeer) at System.Windows.Automation.Peers.AutomationPeer.AutomationPeerFromInputElement(IInputElement focusedElement) at System.Windows.Automation.Peers.AutomationPeer.RaiseFocusChangedEventHelper(IInputElement newFocus) at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp) at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) at System.Windows.Input.KeyboardDevice.Focus(IInputElement element) at System.Windows.UIElement.Focus() at System.Windows.Controls.TabItem.SetFocus() at System.Windows.Controls.TabControl.OnSelectionChanged(SelectionChangedEventArgs e) at Infragistics.Windows.Controls.XamTabControl.OnSelectionChanged(SelectionChangedEventArgs e) at System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedItems, List`1 selectedItems) at System.Windows.Controls.Primitives.Selector.SelectionChanger.End() at System.Windows.Controls.Primitives.Selector.SetSelectedHelper(Object item, FrameworkElement UI, Boolean selected) at System.Windows.Controls.Primitives.Selector.NotifyIsSelectedChanged(FrameworkElement container, Boolean selected, RoutedEventArgs e) at System.Windows.Controls.Primitives.Selector.OnSelected(Object sender, RoutedEventArgs e) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at Infragistics.Windows.Controls.TabItemEx.OnSelected(RoutedEventArgs e) at System.Windows.Controls.TabItem.OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at Infragistics.Windows.Controls.TabItemEx.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.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetCurrentValueInternal(DependencyProperty dp, Object value) at System.Windows.Controls.TabItem.OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e) at Infragistics.Windows.Controls.TabItemEx.OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e) at System.Windows.UIElement.OnPreviewGotKeyboardFocusThunk(Object sender, KeyboardFocusChangedEventArgs e) at System.Windows.Input.KeyboardFocusChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) at System.Windows.Input.KeyboardDevice.Focus(IInputElement element) at System.Windows.UIElement.Focus() at Roesberg.WebDocumentation.UI.Views.WebDokuNavigationView.OpenDocumentInTab(WebDokuDocument document, TabItemEx tabItem) in d:\Entwickl\RCC\V1\RCC\Roesberg.WebDocumentation.UI\Views\WebDokuNavigationView.xaml.cs:line 337 at Roesberg.WebDocumentation.UI.Views.WebDokuNavigationView._vm_OpenWebDokuDocument(Object sender, DocumentEventArgs e) in d:\Entwickl\RCC\V1\RCC\Roesberg.WebDocumentation.UI\Views\WebDokuNavigationView.xaml.cs:line 288 at Roesberg.WebDocumentation.Core.ViewModels.WebDokuNavigationViewModel.OnOpenWebDokuDocument(DocumentEventArgs args) in d:\Entwickl\RCC\V1\RCC\Roesberg.WebDocumentation.Core\ViewModels\WebDokuNavigationViewModel.cs:line 629 at Roesberg.WebDocumentation.Core.ViewModels.WebDokuNavigationViewModel.OpenDocument(CboNodes webDokuNode) in d:\Entwickl\RCC\V1\RCC\Roesberg.WebDocumentation.Core\ViewModels\WebDokuNavigationViewModel.cs:line 945 at Roesberg.WebDocumentation.Core.ViewModels.WebDokuNavigationViewModel.TreeVM_ItemDoubleClicked(Object sender, RBTreeNodeDoubleClickedEventArgs e) in d:\Entwickl\RCC\V1\RCC\Roesberg.WebDocumentation.Core\ViewModels\WebDokuNavigationViewModel.cs:line 857 at Roesberg.TreePropSheet.Core.ViewModels.RBTree.RBTreeListViewViewModel.OnNodeDoubleClicked(RBTreeNode node) in d:\Entwickl\RCC\V1\RCC\Roesberg.TreePropSheet.Core\ViewModels\RBTree\RBTreeListViewViewModel.cs:line 3345 at Roesberg.TreePropSheet.Core.ViewModels.RBTree.RBTreeListViewViewModel.NodeDoubleClickedHandler(RBTreeNode node) in d:\Entwickl\RCC\V1\RCC\Roesberg.TreePropSheet.Core\ViewModels\RBTree\RBTreeListViewViewModel.cs:line 3331 at Roesberg.TreePropSheet.UI.Controls.RBTreeList.TreeListItem.OnMouseDoubleClick(MouseButtonEventArgs e) in d:\Entwickl\RCC\V1\RCC\Roesberg.TreePropSheet.UI\Controls\RBTreeList\TreeListItem.cs:line 74 at System.Windows.Controls.Control.HandleDoubleClick(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.ContentElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
As a workaround I had to do 2 things:
1. Create an own control inheriting from XamDataGrid:
public class DataGridNonAutomation : XamDataGrid { protected override AutomationPeer OnCreateAutomationPeer() { return new EmptyAutomationPeer(this); } }
public class EmptyAutomationPeer : FrameworkElementAutomationPeer { public EmptyAutomationPeer(FrameworkElement owner) : base(owner) { } protected override List<AutomationPeer> GetChildrenCore() { return new List<AutomationPeer>(); } }
2. Remove the following FieldSetting: AllowRecordFiltering="True"
Here's the resulting XAML:
<controls:DataGridNonAutomation x:Name="PropertyGrid" DataSource="{Binding DocumentData}" Theme="Office2k7Black" GroupByAreaLocation="AboveDataArea" ScrollingMode="Immediate"> <controls:DataGridNonAutomation.FieldLayouts> <igDP:FieldLayout> <igDP:Field Name="Caption" Visibility="Visible" Width="220" Label="Bezeichnung" Localization.Attributes="Label(Text Readable Modifiable)"/> <igDP:Field Name="Value" Visibility="Visible" Width="*" Label="Wert" Localization.Attributes="Label(Text Readable Modifiable)"/> <igDP:Field Name="Group" Visibility="Visible" Width="*" Label="Gruppe" Localization.Attributes="Label(Text Readable Modifiable)"/> <igDP:FieldLayout.SortedFields> <igDP:FieldSortDescription IsGroupBy="True" Direction="Ascending" FieldName="Group" /> igDP:FieldLayout.SortedFields> </igDP:FieldLayout> </controls:DataGridNonAutomation.FieldLayouts> <controls:DataGridNonAutomation.FieldSettings> <igDP:FieldSettings AllowEdit="False" CellClickAction="SelectRecord" AllowGroupBy="True" CellVisibilityWhenGrouped="Collapsed" /> <controls:DataGridNonAutomation.FieldSettings> <controls:DataGridNonAutomation.FieldLayoutSettings> <igDP:FieldLayoutSettings HighlightAlternateRecords="False" AllowDelete="False" HeaderPlacementInGroupBy="OnTopOnly"/> </controls:DataGridNonAutomation.FieldLayoutSettings></controls:DataGridNonAutomation>
This works but I want the RecordFiltering working and don't want to have to override some or all controls to be able to override OnCreateAutomationPeer().
Maybe the post http://stackoverflow.com/questions/4017786/wpf-recursive-call-to-automation-peer-api-is-not-valid could gives a hint describing a problem with a combobox withing the grid.The record filter uses a XamComboBox...
Please have a look at it and give me a short feedback what to do.Sorry, but I can't give a small example project for reproducing the error. But maybe the stacktrace helps.
Best regardscew3
Maybe I have another hint for you:
The view, containing the grid is simultanously loaded twice, one in the active tab, one in a new tab, each with data bound to a datasource.
So there are 2 objetcs with the same name in the visual tree retrievieng data. Loading the data does not cause any exceptions.
There are no problems
if the bound data is an empty list,
- or - if the second view is loaded, after the first completely rendered the data.
- or - if the new tab gets the focus before the view is set to the content of the tab so the contained grid will be in the visible area. Maybe it'S a problem of virtualizing.
Any ideas?
The following exception shows, that there is a Combobox.OnSelectionChanged that may cause the problem:As I already mentioned, there are no problems if the data is empty. So there may will be no SelectionChanged raised...
Exception:System.Windows.Markup.XamlParseException: Recursive call to Automation Peer API is not valid. ---> System.InvalidOperationException: Recursive call to Automation Peer API is not valid. at System.Windows.Automation.Peers.AutomationPeer.GetChildren() at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent) at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent) at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent) at System.Windows.Automation.Peers.AutomationPeer.ValidateConnected(AutomationPeer connectedPeer) at MS.Internal.Automation.ElementProxy.StaticWrap(AutomationPeer peer, AutomationPeer referencePeer) at System.Windows.Automation.Peers.AutomationPeer.ProviderFromPeer(AutomationPeer peer) at System.Windows.Automation.Peers.AutomationPeer.RaiseAutomationEvent(AutomationEvents eventId) at System.Windows.Automation.Peers.SelectorAutomationPeer.RaiseSelectionEvents(SelectionChangedEventArgs e) at System.Windows.Controls.ComboBox.OnSelectionChanged(SelectionChangedEventArgs e) at System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedItems, List`1 selectedItems) at System.Windows.Controls.Primitives.Selector.SelectionChanger.End() at System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(Object item, Boolean assumeInItemsCollection) at System.Windows.Controls.Primitives.Selector.OnSelectedIndexChanged(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.StyleHelper.ApplyTemplatedParentValue(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, DependencyProperty dp, FrameworkElementFactory templateRoot) at System.Windows.StyleHelper.InvalidatePropertiesOnTemplateNode(DependencyObject container, FrameworkObject child, Int32 childIndex, FrugalStructList`1& childRecordFromChildIndex, Boolean isDetach, FrameworkElementFactory templateRoot) at System.Windows.FrameworkTemplate.InvalidatePropertiesOnTemplate(DependencyObject container, Object currentObject) at System.Windows.FrameworkTemplate.HandleBeforeProperties(Object createdObject, DependencyObject& rootObject, DependencyObject container, FrameworkElement feContainer, INameScope nameScope) at System.Windows.FrameworkTemplate.<>c__DisplayClass6.b__3(Object sender, XamlObjectEventArgs args) at System.Xaml.XamlObjectWriter.OnBeforeProperties(Object value) at System.Xaml.XamlObjectWriter.Logic_CreateAndAssignToParentStart(ObjectWriterContext ctx) at System.Xaml.XamlObjectWriter.WriteStartMember(XamlMember property) at System.Xaml.XamlWriter.WriteNode(XamlReader reader) at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter) --- End of inner exception stack trace --- at System.Windows.Markup.XamlReader.RewrapException(Exception e, Uri baseUri) at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter) at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter) at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField) at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren) at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate) at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 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.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at Infragistics.Windows.Controls.CardPanel.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at Infragistics.Windows.DataPresenter.DataItemPresenter.MeasureOverride(Size availableSize) at Infragistics.Windows.DataPresenter.CellValuePresenter.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at Infragistics.Windows.DataPresenter.VirtualizingDataRecordCellPanel.TryGetPreferredExtent(FieldLayoutItemBase fieldLayoutItem, Boolean cell, Boolean width, Double& extent) at Infragistics.Windows.DataPresenter.CellLayoutItem.GetSize(LayoutItemSize size) at Infragistics.Windows.DataPresenter.LayoutItem.Infragistics.Controls.Layouts.Primitives.ILayoutItem.get_PreferredSize() at Infragistics.Controls.Layouts.Primitives.GridBagLayoutManager.GridBagConstraintCache..ctor(ILayoutItem item, IGridBagConstraint gc) at Infragistics.Controls.Layouts.Primitives.GridBagLayoutManager.GetGridBagCacheHelper(GridBagConstraintCache[]& tmpGccArr) at Infragistics.Controls.Layouts.Primitives.GridBagLayoutManager.CalculateGridBagLayout() at Infragistics.Controls.Layouts.Primitives.GridBagLayoutManager.CalculatePreferredSize(ILayoutContainer container, Object containerContext) at Infragistics.Windows.DataPresenter.FieldGridBagLayoutManager.CalculatePreferredSize() at Infragistics.Windows.DataPresenter.VirtualizingDataRecordCellPanel.MeasureOverride(Size availableSize) 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 Infragistics.Windows.Controls.CardPanel.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at Infragistics.Windows.DataPresenter.DataRecordCellArea.MeasureOverride(Size availableSize) 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 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.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) at System.Windows.Controls.Grid.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at Infragistics.Windows.Controls.CardPanel.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at Infragistics.Windows.DataPresenter.RecordPresenter.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateNextElement(Boolean isHeader) at Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateRecordsHelper() at Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateTopFixedRecords() at Infragistics.Windows.DataPresenter.GridViewPanelFlat.GenerationCache.GenerateAllRecords() at Infragistics.Windows.DataPresenter.GridViewPanelFlat.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.ContextLayoutManager.UpdateLayout() at System.Windows.UIElement.UpdateLayout() at Infragistics.Windows.Automation.Peers.XamTabControlAutomationPeer.GetChildrenCore() at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren() at System.Windows.Automation.Peers.AutomationPeer.GetChildren() at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent) at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent) at System.Windows.Automation.Peers.AutomationPeer.isDescendantOf(AutomationPeer parent) at System.Windows.Automation.Peers.AutomationPeer.ValidateConnected(AutomationPeer connectedPeer) at System.Windows.Automation.Peers.AutomationPeer.AutomationPeerFromInputElement(IInputElement focusedElement) at System.Windows.Automation.Peers.AutomationPeer.RaiseFocusChangedEventHelper(IInputElement newFocus) at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp) at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) at System.Windows.Input.KeyboardDevice.Focus(IInputElement element) at System.Windows.UIElement.Focus() at System.Windows.Controls.TabItem.SetFocus() at System.Windows.Controls.TabControl.OnSelectionChanged(SelectionChangedEventArgs e) at Infragistics.Windows.Controls.XamTabControl.OnSelectionChanged(SelectionChangedEventArgs e) at System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedItems, List`1 selectedItems) at System.Windows.Controls.Primitives.Selector.SelectionChanger.End() at System.Windows.Controls.Primitives.Selector.SetSelectedHelper(Object item, FrameworkElement UI, Boolean selected) at System.Windows.Controls.Primitives.Selector.NotifyIsSelectedChanged(FrameworkElement container, Boolean selected, RoutedEventArgs e) at System.Windows.Controls.Primitives.Selector.OnSelected(Object sender, RoutedEventArgs e) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at Infragistics.Windows.Controls.TabItemEx.OnSelected(RoutedEventArgs e) at System.Windows.Controls.TabItem.OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at Infragistics.Windows.Controls.TabItemEx.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.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at System.Windows.DependencyObject.SetCurrentValueInternal(DependencyProperty dp, Object value) at System.Windows.Controls.TabItem.OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e) at Infragistics.Windows.Controls.TabItemEx.OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e) at System.Windows.UIElement.OnPreviewGotKeyboardFocusThunk(Object sender, KeyboardFocusChangedEventArgs e) at System.Windows.Input.KeyboardFocusChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) at System.Windows.Input.KeyboardDevice.Focus(IInputElement element) at System.Windows.UIElement.Focus() at Roesberg.WebDocumentation.UI.Views.WebDokuNavigationView.OpenDocumentInTab(WebDokuDocument document, TabItemEx tabItem) in D:\Entwickl\RCC\V1\10.0.2_branch\Roesberg.WebDocumentation.UI\Views\WebDokuNavigationView.xaml.cs:line 328
Hello,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post, but it seems like that I am missing something in your scenario, so if this is still an issue for you, could you please send an isolated sample project, where the issue is reproduced, so I can investigate it further for you.
Feel free to write me if you have further questions.
Hi Stefan,
as far as I can see the problem is solved using service release 20122.2057.
Thank you!!!
Best regards,cew3
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Hi Juan,
I have just replied to your original post. Here.
We are using TestAdvantage for WPF (for HP QuickTest Professional software) 2012 Vol. 1. While executing the steps with QTP along with Testadvantage add-in , we get above error but while doing manually the same steps in application , we dont get that error.
Regards,
Meenu
Hello again,
Could you please verify that you use the latest service release of 12.1 (12.1.20121.2314). If not you can download the Service Releases by logging to our web site and going to Account \Keys & Downloads.
https://ko.infragistics.com/my-account/keys-and-downloads/
Looking forward for your reply.
Hi Stefen,
Thanks for your reply. We are using Netadvantage 2012.1 version for wpf.
Hello Meenu,
Could you please tell me the exact version of NetAdvantage that you use?