locked
Element is already the child of another elementint. RRS feed

  • Question

  •  Hi, I am hoping someone can help me.

     I am trying to create a JIT collection.  I have successfully generated the cxml file and the test page looks ok.  When I try to load in the PivotViewer I am receiving this error:

    Microsoft JScript runtime error: Unhandled Error in Silverlight Application
    Code: 4009   
    Category: ManagedRuntimeError      
    Message: Element is already the child of another element.  

    If I click Ignore I see this:

    throw new Error("Unhandled Error in Silverlight Application MeasureOverride of element 'Microsoft.Pivot.Internal.Controls.SeahorseItemVirtualizingPanel' should not return PositiveInfinity or NaN as its DesiredSize.");

    Other collections in the JIT sample are working so I'm trying to figure out the issue.

    The cxml I'm generating is:

    <Collection xmlns="http://schemas.microsoft.com/collection/metadata/2009" xmlns:ui="http://schemas.microsoft.com/livelabs/pivot/collection/2009" SchemaVersion="1" Name="People">
        - <FacetCategories>
            <FacetCategory Name="Job Title" Type="String" />
        </FacetCategories>
        - <Items ImgBase="People-91e3feb56de04e52a74eba6816fd9967.dzc">
            - <Item Id="0" Img="#0" Name="5138E81F-8202-4E47-931D-F53A6E2A2B76">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Analyst Programmer" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="1" Img="#1" Name="5E78C298-4022-4FCD-A570-D6AE66E8CEAC">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Senior Programmer" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="2" Img="#2" Name="E39667B2-DD67-47BC-BC9D-8FEFC6FFC9DD">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Consultant" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="3" Img="#3" Name="74277F39-A0C9-4789-9BE0-797B6B89EFDB">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level G" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="4" Img="#4" Name="A2C81C54-CF7C-47F0-AC66-7B9D8E620167">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level C" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="5" Img="#5" Name="96AE625A-6550-4AAE-AE45-C87AF814FD46">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level E" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="6" Img="#6" Name="5E463565-ABA4-4CAD-BA97-9AB04E7C9CDA">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level G" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="7" Img="#7" Name="251DECA4-2AD0-4B21-BBB6-E809B60F9783">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Regular Contractor" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="8" Img="#8" Name="92F56483-E50E-4D47-B60C-1C9267F5966C">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level C" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="9" Img="#9" Name="61888F57-D13B-42A8-9867-A545C284CAB7">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level D" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="10" Img="#10" Name="FE881ECA-D32D-4AC2-A87B-ACADFCD68C79">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Senior Manager" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="11" Img="#11" Name="5289A1E0-5525-4680-835D-F76EA8F1990D">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level C" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="12" Img="#12" Name="77F7B998-4A65-47DE-AB20-00E94AC00B14">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Consultant" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="13" Img="#13" Name="193EAD8E-824F-4622-8C97-F62570FE2CEE">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level H" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="14" Img="#14" Name="DEFF8B37-8D64-4F6C-838F-994135DD2482">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Senior Specialist" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="15" Img="#15" Name="A3948D55-DCEB-491C-9A90-C48DC46720A2">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level D" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="16" Img="#16" Name="97E7E2F0-82D1-4888-B517-ADD0EDA45130">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level E" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="17" Img="#17" Name="67141611-AAFB-400C-8732-02851FB43D0F">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level D" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="18" Img="#18" Name="7851C87E-45C5-4B92-92FC-EE2B8B38C85A">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Level B" />
                    </Facet>
                </Facets>
            </Item>
            - <Item Id="19" Img="#19" Name="A322812B-86FC-40D0-9268-7B78BE686C90">
                - <Facets>
                    - <Facet Name="Job Title">
                        <String Value="Consultant" />
                    </Facet>
                </Facets>
            </Item>
        </Items>
    </Collection> 

    Friday, July 2, 2010 1:49 PM

Answers

  • After installing the silverlight 4 toolkit, make sure you clean & rebuild the Visual Studio 2010 solution. This is because Visual Studio doesn't see any of the source inputs changed (the only change is you've installed some DLLs that are useful to include in the silverlight XAP pack, so it won't *automatically* rebuild)

    IF you've already done this, and it still doesn't work, try making a copy of the .XAP file and rename to a .ZIP file (.XAP is really just a .ZIP file containing the binaries for the application), then unpack the resulting .ZIP and post the list of files here as well as the contents of the manifest, that might help.

    Thursday, July 8, 2010 11:38 PM

All replies

  • May not be related but i have seen an error like this in the past when adding and removing child controls from an app on the fly.

    in my case it did have to do with the x:Name of the child controls not beeing set on each child.

    see if that might be happening here, check every control on the page that is in the xaml that starts and check that the collection is getting valid different names.

    Friday, July 2, 2010 2:23 PM
  • PivotControlViewer should be contained in an element that has width of "*", Auto width might not work.

    to rule out this issue

    I would try removing all the xaml from the page and just have something like this in the page and see

    <Grid>

    <local:PivotViewerControl/>

    </Grid>

    BTW, Did you write custom code for generating, or using the library from the sample source?

     

    Friday, July 2, 2010 2:35 PM
  • Make sure you have the very latest Silverlight Tools nad SDK libraries from, I think, April 2010. I had a very similar error before updating them - now it's fixed.
    Friday, July 2, 2010 5:47 PM
  • I'm having the same issue with a very simple app:
    <UserControl x:Class="Ag.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:pivot="clr-namespace:System.Windows.Pivot;assembly=System.Windows.Pivot"
        mc:Ignorable="d"
        d:DesignHeight="300" d:DesignWidth="400">
    
        <Grid x:Name="LayoutRoot" Background="White">
            <pivot:PivotViewer x:Name="PivotViewer" />
        </Grid>
    </UserControl>
    

    Here is what I can see from windbg... any chance someone on the Pivot team can take a look and see if something is obviously wrong here? It doesn't look like silverlight has started loading my code yet.

    Microsoft (R) Windows Debugger Version 6.11.0001.404 X86
    Copyright (c) Microsoft Corporation. All rights reserved.
    
    *** wait with pending attach
    Symbol search path is: srv*
    Executable search path is: 
    ModLoad: 00400000 0049c000   C:\Program Files (x86)\Internet Explorer\iexplore.exe
    ModLoad: 7d600000 7d6f0000   C:\windows\system32\ntdll.dll
    ModLoad: 7d4c0000 7d5f0000   C:\windows\syswow64\kernel32.dll
    ModLoad: 7d1e0000 7d27c000   C:\windows\syswow64\ADVAPI32.dll
    ModLoad: 7da20000 7db00000   C:\windows\syswow64\RPCRT4.dll
    ModLoad: 7d8d0000 7d920000   C:\windows\syswow64\Secur32.dll
    ModLoad: 7d930000 7da00000   C:\windows\syswow64\USER32.dll
    ModLoad: 7d800000 7d890000   C:\windows\syswow64\GDI32.dll
    ModLoad: 77ba0000 77bfa000   C:\windows\syswow64\msvcrt.dll
    ModLoad: 7d180000 7d1d2000   C:\windows\syswow64\SHLWAPI.dll
    ModLoad: 7c8d0000 7d0cf000   C:\windows\syswow64\SHELL32.dll
    ModLoad: 77670000 777a9000   C:\windows\syswow64\ole32.dll
    ModLoad: 40a90000 40c78000   C:\windows\syswow64\iertutil.dll
    ModLoad: 6f350000 6f483000   C:\windows\syswow64\urlmon.dll
    ModLoad: 004a0000 0052b000   C:\windows\syswow64\OLEAUT32.dll
    ModLoad: 7dee0000 7df40000   C:\windows\system32\IMM32.DLL
    ModLoad: 7dbc0000 7dbc9000   C:\windows\system32\LPK.DLL
    ModLoad: 75490000 754f5000   C:\windows\system32\USP10.dll
    ModLoad: 7dbd0000 7dcd3000   C:\windows\WinSxS\WOW64_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.3959_x-ww_5FA17F4E\comctl32.dll
    ModLoad: 40c80000 41713000   C:\windows\syswow64\IEFRAME.dll
    ModLoad: 762b0000 762f9000   C:\windows\syswow64\comdlg32.dll
    ModLoad: 403e0000 403e6000   C:\Program Files (x86)\Internet Explorer\xpshims.dll
    ModLoad: 4b3c0000 4b410000   C:\windows\SysWOW64\MSCTF.dll
    ModLoad: 02b30000 02df5000   C:\windows\system32\xpsp2res.dll
    ModLoad: 770e0000 771e8000   C:\windows\system32\SETUPAPI.dll
    ModLoad: 777b0000 77833000   C:\windows\system32\CLBCatQ.DLL
    ModLoad: 77010000 770d6000   C:\windows\system32\COMRes.dll
    ModLoad: 77b90000 77b98000   C:\windows\syswow64\VERSION.dll
    ModLoad: 44460000 444a0000   C:\Program Files (x86)\Internet Explorer\ieproxy.dll
    ModLoad: 403f0000 404d6000   C:\windows\syswow64\WININET.dll
    ModLoad: 031d0000 031d9000   C:\windows\syswow64\Normaliz.dll
    ModLoad: 71c00000 71c17000   C:\windows\system32\ws2_32.dll
    ModLoad: 71bf0000 71bf8000   C:\windows\system32\WS2HELP.dll
    ModLoad: 76920000 769e2000   C:\windows\system32\USERENV.dll
    ModLoad: 74540000 745d3000   C:\windows\system32\MLANG.dll
    ModLoad: 7df50000 7dfc0000   C:\windows\system32\UxTheme.dll
    ModLoad: 75e60000 75e87000   C:\windows\system32\apphelp.dll
    ModLoad: 4dc30000 4dc5e000   C:\windows\system32\msctfime.ime
    ModLoad: 10000000 10011000   C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEHelperShim.dll
    ModLoad: 78130000 781cb000   C:\windows\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4027_x-ww_E69378D0\MSVCR80.dll
    ModLoad: 7c420000 7c4a7000   C:\windows\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4027_x-ww_E69378D0\MSVCP80.dll
    ModLoad: 03720000 03730000   C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEHelper.dll
    ModLoad: 03740000 03850000   C:\Program Files (x86)\Skype\Toolbars\Internet Explorer\SkypeIEPlugin.dll
    ModLoad: 6d580000 6d628000   C:\windows\system32\dbghelp.dll
    ModLoad: 61880000 618bb000   C:\windows\system32\OLEACC.dll
    ModLoad: 03aa0000 03c09000   C:\Program Files (x86)\Skype\Toolbars\Shared\SPhoneParser.dll
    ModLoad: 76280000 76285000   C:\windows\system32\MSIMG32.dll
    ModLoad: 75da0000 75e5d000   C:\windows\system32\SXS.DLL
    ModLoad: 04dd0000 04e36000   C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live\WindowsLiveLogin.dll
    ModLoad: 04f90000 0505a000   C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live\msidcrl40.dll
    ModLoad: 761b0000 76243000   C:\windows\system32\CRYPT32.dll
    ModLoad: 76190000 761a2000   C:\windows\system32\MSASN1.dll
    ModLoad: 76b70000 76b7b000   C:\windows\system32\PSAPI.DLL
    ModLoad: 4e7c0000 4e81d000   C:\windows\WinSxS\x86_Microsoft.Windows.WinHTTP_6595b64144ccf1df_5.1.3790.4584_x-ww_FE3453F4\WINHTTP.dll
    ModLoad: 76bb0000 76bdc000   C:\windows\system32\WINTRUST.dll
    ModLoad: 76c10000 76c38000   C:\windows\syswow64\imagehlp.dll
    ModLoad: 6d440000 6d44c000   C:\Program Files (x86)\Java\jre6\bin\jp2ssv.dll
    ModLoad: 7c340000 7c396000   C:\Program Files (x86)\Java\jre6\bin\MSVCR71.dll
    ModLoad: 68000000 68035000   C:\windows\system32\rsaenh.dll
    ModLoad: 76e90000 76ecf000   C:\windows\system32\RASAPI32.dll
    ModLoad: 76e40000 76e52000   C:\windows\system32\rasman.dll
    ModLoad: 71c40000 71c97000   C:\windows\system32\NETAPI32.dll
    ModLoad: 76e60000 76e8f000   C:\windows\system32\TAPI32.dll
    ModLoad: 76e30000 76e3c000   C:\windows\system32\rtutils.dll
    ModLoad: 76aa0000 76acd000   C:\windows\system32\WINMM.dll
    ModLoad: 71e00000 71e14000   C:\windows\system32\msapsspc.dll
    ModLoad: 78080000 78091000   C:\windows\system32\MSVCRT40.dll
    ModLoad: 71e20000 71e70000   C:\windows\system32\msnsspc.dll
    ModLoad: 76c90000 76cb7000   C:\windows\SysWOW64\msv1_0.DLL
    ModLoad: 766e0000 766ec000   C:\windows\system32\cryptdll.dll
    ModLoad: 76cf0000 76d0a000   C:\windows\system32\iphlpapi.dll
    ModLoad: 722f0000 722f5000   C:\windows\system32\sensapi.dll
    ModLoad: 6daf0000 6db02000   C:\Program Files (x86)\Java\jre6\lib\deploy\jqs\ie\jqs_plugin.dll
    ModLoad: 7db30000 7dbb0000   C:\windows\system32\mswsock.dll
    ModLoad: 5f270000 5f2ca000   C:\windows\system32\hnetcfg.dll
    ModLoad: 71ae0000 71ae8000   C:\windows\System32\wshtcpip.dll
    ModLoad: 04e90000 04eca000   C:\Program Files (x86)\HttpWatch\httpwatchsc.dll
    ModLoad: 73070000 73097000   C:\windows\system32\WINSPOOL.DRV
    ModLoad: 06000000 063db000   C:\Program Files (x86)\HttpWatch\httpwatch.dll
    ModLoad: 74b40000 74b63000   C:\windows\system32\oledlg.dll
    ModLoad: 4dd60000 4df0b000   C:\windows\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.6001.22319_x-ww_F0B4C2DF\gdiplus.dll
    ModLoad: 48ef0000 48f61000   C:\windows\system32\RICHED20.DLL
    ModLoad: 404e0000 40a8f000   C:\windows\system32\mshtml.dll
    ModLoad: 057c0000 057e9000   C:\windows\system32\msls31.dll
    ModLoad: 42c50000 43091000   C:\windows\system32\msi.dll
    ModLoad: 744c0000 744eb000   C:\WINDOWS\SysWOW64\msimtf.dll
    ModLoad: 40220000 402d4000   C:\WINDOWS\SysWOW64\jscript.dll
    ModLoad: 71d00000 71d1c000   C:\windows\SysWOW64\actxprxy.dll
    ModLoad: 7b860000 7b95c000   C:\Program Files (x86)\Microsoft Silverlight\4.0.50524.0\npctrl.dll
    ModLoad: 7b970000 7bf26000   C:\Program Files (x86)\Microsoft Silverlight\4.0.50524.0\agcore.dll
    ModLoad: 79150000 794b8000   C:\Program Files (x86)\Microsoft Silverlight\4.0.50524.0\coreclr.dll
    ModLoad: 066f0000 06730000   C:\Program Files (x86)\Microsoft Silverlight\4.0.50524.0\agcore.debug.dll
    ModLoad: 0a5f0000 0a6ab000   C:\Program Files (x86)\Microsoft Silverlight\4.0.50524.0\npctrlUI.dll
    0:029> g
    (2c68.614): CLR exception - code e0434352 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=02aed538 ebx=00000001 ecx=00000000 edx=00000006 esi=02aed5d0 edi=00000005
    eip=7d4e237e esp=02aed534 ebp=02aed588 iopl=0         nv up ei pl nz na pe nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000206
    kernel32!RaiseException+0x53:
    7d4e237e 5e              pop     esi
    0:008> !pe
    Exception object: 06d3e194
    Exception type:   System.Windows.Markup.XamlParseException
    Message:          Element is already the child of another element. [Line: 0 Position: 0]
    InnerException:   <none>
    StackTrace (generated):
    <none>
    StackTraceString: <none>
    HResult: 80131501
    0:008> !clrstack
    OS Thread Id: 0x614 (8)
    Child SP IP       Call Site
    02aed660 7d4e237e [HelperMethodFrame: 02aed660] 
    02aed6c0 7b6910e6 MS.Internal.XcpImports.CreateFromXaml(System.IO.UnmanagedMemoryStream, System.String, Boolean, Boolean, Boolean)
    02aed6fc 7b54129c System.Windows.Controls.Control.GetBuiltInStyle(IntPtr, IntPtr ByRef)
    02aed74c 7b5b3093 DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int32, IntPtr)
    02aed81c 06aa410e [ContextTransitionFrame: 02aed81c] 
    0:008> !dso
    OS Thread Id: 0x614 (8)
    ESP/REG  Object   Name
    02AED5A4 06d3e194 System.Windows.Markup.XamlParseException
    02AED5B4 06d3e194 System.Windows.Markup.XamlParseException
    02AED624 06d24da0 System.String    System.Windows.Pivot
    02AED62C 06d3e194 System.Windows.Markup.XamlParseException
    02AED63C 06d24da0 System.String    System.Windows.Pivot
    02AED668 06d3e0f8 System.String    Element is already the child of another element. [Line: 0 Position: 0]
    02AED688 06d3e194 System.Windows.Markup.XamlParseException
    02AED69C 06d3defc System.String    Element is already the child of another element.
    02AED6A4 06d3e194 System.Windows.Markup.XamlParseException
    02AED6DC 06d20e60 System.String    System.Windows.Pivot.g.resources
    02AED6E0 06d24d64 System.Reflection.AssemblyName
    02AED6E4 06cdb400 System.String    themes/generic.xaml
    02AED6FC 06d24ccc System.IO.UnmanagedMemoryStream
    02AED700 06d20e24 System.String    System.Windows.Pivot.g
    02AED704 06d20b58 System.Collections.Generic.Dictionary`2[[System.Reflection.Assembly, mscorlib],[System.Windows.ResourceDictionary, System.Windows]]
    02AED708 06d0e088 System.Reflection.RuntimeAssembly
    02AED70C 06d1f0f0 System.RuntimeType
    02AED73C 06d0c750 System.Windows.Controls.Control+GetBuiltInStyleDelegate
    02AED814 06d0da60 System.Object
    0:008> !do 06d24ccc 
    Name:        System.IO.UnmanagedMemoryStream
    MethodTable: 79b161e0
    EEClass:     796f60d0
    Size:        56(0x38) bytes
    File:        C:\Program Files (x86)\Microsoft Silverlight\4.0.50524.0\mscorlib.dll
    Fields:
          MT    Field   Offset                 Type VT     Attr    Value Name
    79b1921c  400116f      354     System.IO.Stream  0   shared   static Null
        >> Domain:Value  058b1db0:NotInit  064790a8:NotInit  09349808:NotInit  <<
    79b17bb8  4001251       24 ...rvices.SafeBuffer  0 instance 00000000 _buffer
    79b1d720  4001252       28                  PTR  0 instance 0b0b0d88 _mem
    79b10f8c  4001253        4         System.Int64  1 instance 35890 _length
    79b10f8c  4001254        c         System.Int64  1 instance 35890 _capacity
    79b10f8c  4001255       14         System.Int64  1 instance 0 _position
    79b10f8c  4001256       1c         System.Int64  1 instance 0 _offset
    79afe228  4001257       2c         System.Int32  1 instance        1 _access
    79b107e4  4001258       30       System.Boolean  1 instance        1 _isOpen
    0:008> da 0b0b0d88 L35890 
    0b0b0d88  "<ResourceDictionary..    xmlns=""
    0b0b0da8  "http://schemas.microsoft.com/win"
    0b0b0dc8  "fx/2006/xaml/presentation"..    "
    0b0b0de8  "xmlns:x="http://schemas.microsof"
    0b0b0e08  "t.com/winfx/2006/xaml"..    xmln"
    0b0b0e28  "s:anim="clr-namespace:Microsoft."
    0b0b0e48  "Pivot.Internal.Animation;assembl"
    0b0b0e68  "y=System.Windows.Pivot.SharedUI""
    0b0b0e88  "..    xmlns:vsm="clr-namespace:S"
    0b0b0ea8  "ystem.Windows;assembly=System.Wi"
    0b0b0ec8  "ndows"..    xmlns:con="clr-names"
    0b0b0ee8  "pace:Microsoft.Pivot.Internal.Co"
    0b0b0f08  "ntrols"..    xmlns:views="clr-na"
    0b0b0f28  "mespace:Microsoft.Pivot.Internal"
    0b0b0f48  ".Views"..    xmlns:vm="clr-names"
    0b0b0f68  "pace:Microsoft.Pivot.Internal.Vi"
    0b0b0f88  "ewModels;assembly=System.Windows"
    0b0b0fa8  ".Pivot.SharedUI"..    xmlns:shar"
    0b0b0fc8  "edcon="clr-namespace:Microsoft.P"
    0b0b0fe8  "ivot.Internal.Controls;assembly="
    0b0b1008  "System.Windows.Pivot.SharedUI".."
    0b0b1028  "    xmlns:shutil="clr-namespace:"
    0b0b1048  "Microsoft.Pivot.Internal.Utiliti"
    0b0b1068  "es;assembly=System.Windows.Pivot"
    0b0b1088  ".Utilities"..    xmlns:int="clr-"
    0b0b10a8  "namespace:Microsoft.Pivot.Intern"
    0b0b10c8  "al.Interactivity;assembly=System"
    0b0b10e8  ".Windows.Pivot.SharedUI"..    xm"
    0b0b1108  "lns:beh="clr-namespace:Microsoft"
    0b0b1128  ".Pivot.Internal.Interactivity.Be"
    0b0b1148  "haviors;assembly=System.Windows."
    0b0b1168  "Pivot.SharedUI"..    xmlns:toolk"
    0b0b1188  "it="clr-namespace:System.Windows"
    0b0b11a8  ".Controls;assembly=System.Window"
    0b0b11c8  "s.Controls.Toolkit"..    xmlns:p"
    0b0b11e8  "="clr-namespace:System.Windows.P"
    0b0b1208  "ivot">....    <shutil:NotConvert"
    0b0b1228  "er x:Key="NotConverter"/>..    <"
    0b0b1248  "shutil:NullToVisibilityConverter"
    0b0b1268  " x:Key="NullToVisibilityConverte"
    0b0b1288  "r" />..    <shutil:IsEmptyConver"
    0b0b12a8  "ter x:Key="IsEmptyConverter" />."
    0b0b12c8  "...    <!-- Colors copied from D"
    0b0b12e8  "efaultColors.xmal ****  DefaultC"
    0b0b1308  "olors.xaml can't be merged in th"
    0b0b1328  "e resource dictionary here-->.. "
    Friday, July 2, 2010 6:04 PM
  • Boxout6,

    Can you also post the contents of the DZC you are generating? I suspect something is invalid there, and causing the problem, although I've tried a couple ideas of invalid DZC contents to try and repro this, and so far I can't. At least if it all looks good, we can rule that out.

    Friday, July 2, 2010 7:06 PM
  •  I use the latest version of pivot, toolkit, and create a very simple project (just contains only one pivot control in xaml file), but this error still there.

    Saturday, July 3, 2010 7:44 AM
  • Same problem here - in my own testproject and in the provided PivotViewerSample.
    Saturday, July 3, 2010 8:29 AM
  •  Ok - reinstalled the latest silverlight toolkit (http://silverlight.codeplex.com/releases/view/43528) and everything works fine now.

    Saturday, July 3, 2010 9:01 AM
  •  Uninstall and reinstall again (after download the latest version of toolkit), the error still exist. Anyone help me...

    Saturday, July 3, 2010 10:54 AM
  • dqminh,

    Sorry to have to ask but I have to make sure, because there is a lot of confusion between Silverlight 4 *Tools* for Visual Studio 2010 (which adds VS extensions to work with silverlight 4), and Silvelright 4 *Toolkit* (which provides a bunch of silverlight libraries that you can use to get extra controls).

    If you are still having problems, even with the sample, I have to ask to make sure there wasn't some confusion in what you installed/reinstalled...

    If not, let me know. We'll keep working on this till we figure it out.

    Saturday, July 3, 2010 1:12 PM
  •  To Andrew,

    I follow the instruction in Troubleshooting.txt (can be found in Pivot_JIT_Sample.zip):

    REQUIREMENTS:

    Visual Studio 2010 (includes the .NET 4.0 framework)
    http://www.microsoft.com/visualstudio/en-us/download

    Microsoft Silverlight 4 Tools for Visual Studio 2010
    http://www.microsoft.com/downloads/details.aspx?FamilyID=eff8a0da-0a4d-48e8-8366-6ddf2ecad801

    Silverlight Toolkit
    http://silverlight.codeplex.com/

    Silverlight Developer Tools
    http://go.microsoft.com/fwlink/?LinkId=146060

    So, I have Visual Studio 2010 Utimate, I download Microsoft Silverlight 4 Tools for Visual Studio 2010 (Silverlight4_Tools.exe), Silverlight Toolkit (Silverlight_4_Toolkit_April_2010.msi) and Silverlight Developer Tools (Silverlight_Developer.exe).

     What am I wrong?

    Saturday, July 3, 2010 10:42 PM
  •  Dear Andrew,

    Your sample run smoothly in Windows 7 64 bit, but cannot run in Windows 7 32 bit (error Element is already the child of another element.)

    Please help me.

    Monday, July 5, 2010 12:13 AM
  • After installing the silverlight 4 toolkit, make sure you clean & rebuild the Visual Studio 2010 solution. This is because Visual Studio doesn't see any of the source inputs changed (the only change is you've installed some DLLs that are useful to include in the silverlight XAP pack, so it won't *automatically* rebuild)

    IF you've already done this, and it still doesn't work, try making a copy of the .XAP file and rename to a .ZIP file (.XAP is really just a .ZIP file containing the binaries for the application), then unpack the resulting .ZIP and post the list of files here as well as the contents of the manifest, that might help.

    Thursday, July 8, 2010 11:38 PM
  • I tried everything but no.

    Finally I gave up and made another project, this time including the Host Asp.NET Web App in the beginning.

    That helped.

    Monday, July 19, 2010 9:58 AM
  • I just had this same error message (Element is already the child of another element) but is was the result of a different cause and I thought I'd share the solution in case anyone else runs into the same issue...

    In my .cxml file I had the p:BrandImage attibute set to a url that returned an HTTP 403 error. Every time I viewed my cxml file in the SL pivot control I would show this error message, I'd click ok, and the pivot viewer would show everything perfectly fine from there on out. The same cxml file would load without error in the MS Live Labs Pivot app.

    If anyone from the Pivot team is reading, it looks like some better error messages is needed.

    Cheers,

    Tim Greenfield

    Sunday, August 1, 2010 3:44 PM
  • Hi,

    As far as I can see the main reason for this is the duplicate nodes in the cxml file.


    I got the same error. When I changed to another file issue got fixed.

    Thanks,

    Thani

    Tuesday, September 7, 2010 2:02 PM
  • I had the same issue and found the answer in this blog post

    http://www.davidyardy.com/blog/post/2011/03/09/Element-is-already-the-child-SystemWindowsMarkupXamlParseException-3e-PivotControl-Error.aspx

    The problem was some missing references (I believe if there is any problem with installation of the Silverlight Toolkit they won't be included in the zap file automatically).   A reinstall of the Toolkit may help but certainly manually making the right dll references solved the problem.

    This is good.

    Wednesday, March 9, 2011 10:45 AM
  • @Timmy G: thank you!!!!

    My pivotviewer app worked fine locally in visual studio, but not when deployed to iis. I also got the "Element is already the child of another element" error.

    It turned out that when deployed to iis, the relative path to the images I used to fill a Facet was wrong. It could not load the images.

    Thanks again! You saved me hours of searching and frustration! :-)


    Tuesday, March 15, 2011 8:20 AM