none
Cannot build sl3 accordion

    Question

  •  

    Hi,

    Please suggest how to use accordions from sl3 tools. I did below: 

     <UserControl x:Class="AccordionApp.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit">
            <Grid Background="White">           
                <layoutToolkit:Accordion x:Name="acc">
                    <layoutToolkit:AccordionItem Header="First Accordion"/>
                    <layoutToolkit:AccordionItem Header="Second Accordion"/>
                </layoutToolkit:Accordion>         
            </Grid>    
    </UserControl>

    I got below error:
    Error    1    Predefined type 'System.Object' is not defined or imported    AccordionApp


    I checked the accordion sample and added below reference, i do not understand why i need this?
    xmlns:system="clr-namespace:System;assembly=mscorlib"

    Then i get below error:

    Error    1    The tag 'AccordionItem' does not exist in XML namespace 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit'.    ..\\AccordionApp\AccordionApp\MainPage.xaml    10    18    AccordionApp
    Error    2    The tag 'AccordionItem' does not exist in XML namespace 'clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit'.    ..\\AccordionApp\AccordionApp\MainPage.xaml    11    18    AccordionApp

    Please help.

    Wednesday, March 25, 2009 4:33 PM

Answers

  •  Hi,

    In order to use controls from System.Windows.Controls.Layout.Toolkit you need to reference System.Windows.Controls.Toolkit and System.Windows.Controls.

    The full list of Control-->Assemblies dependencies is called out here:
    http://silverlight.codeplex.com/Wiki/View.aspx?title=Silverlight%20Toolkit%20March%202009%20change%20list#assemblies

    Control \ Silverlight Version Silverlight 2 Required Assemblies Silverlight 3 Required Assemblies
    Accordion System.Windows.Controls.Layout.Toolkit.dll & System.Windows.Controls.Toolkit.dll & System.Windows.Controls.dll System.Windows.Controls.Layout.Toolkit.dll & System.Windows.Controls.Toolkit.dll & System.Windows.Controls.dll

    You're probably missing one of these references.

    Sincerely,

     

    Wednesday, March 25, 2009 7:02 PM
  • I have looked at the app, and indeed, you need a reference to System.Windows.Controls.Toolkit.

    I hope that helps!

     

    Wednesday, March 25, 2009 11:00 PM

All replies

  • Hi Silidev,

    this should just work, and I'm not seeing anything done incorrectly.

    Could you maybe zip up the solution and send it to me at [removed]. I will take a look.

    Thank you!

    Wednesday, March 25, 2009 4:48 PM
  • I have sent, please verify and revert back for any suggestions.

    thanks.

    Wednesday, March 25, 2009 5:06 PM
  •  Hi,

    In order to use controls from System.Windows.Controls.Layout.Toolkit you need to reference System.Windows.Controls.Toolkit and System.Windows.Controls.

    The full list of Control-->Assemblies dependencies is called out here:
    http://silverlight.codeplex.com/Wiki/View.aspx?title=Silverlight%20Toolkit%20March%202009%20change%20list#assemblies

    Control \ Silverlight Version Silverlight 2 Required Assemblies Silverlight 3 Required Assemblies
    Accordion System.Windows.Controls.Layout.Toolkit.dll & System.Windows.Controls.Toolkit.dll & System.Windows.Controls.dll System.Windows.Controls.Layout.Toolkit.dll & System.Windows.Controls.Toolkit.dll & System.Windows.Controls.dll

    You're probably missing one of these references.

    Sincerely,

     

    Wednesday, March 25, 2009 7:02 PM
  • I have looked at the app, and indeed, you need a reference to System.Windows.Controls.Toolkit.

    I hope that helps!

     

    Wednesday, March 25, 2009 11:00 PM
  •  Perfect thanks for your quick responses. It works now by adding the missing reference.

    Thursday, March 26, 2009 10:38 AM
  • Thanks. It work great.

    Saturday, February 04, 2012 11:38 PM