I'm using the designer in Visual Studio 2010 + Silverlight 4 to design a page layout.
The page has a Accordian control with a AccordianItem Child conrol. If I open the page in the VS 2010 Designer, I get the following error:
An Unhandled Exception has Occured:
System.Runtime.Serialization.SerializationException
Type 'System.Windows.LayoutCycleException' in assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' is not marked as serializable.
at MS.Internal.Designer.VSDesignerClient.RestoreSelection(List`1 offsetsInXamlFile)
at MS.Internal.Designer.DesignerPane.LoadDesignerView()
However, if I add a Height="100" (or anything other than 'Auto') property to the AccordianItem then the Page opens. Unfortunatly I need the AccordItem to stretch to Fill the Height of the Accordian control.
Here's a portion of the XAML:
<layoutToolkit:Accordion
Name="accordianList"
Width="Auto"
Height="Auto"
MinHeight="150"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch"
SelectionSequence="Simultaneous"
Margin="0,20,0,20">
<layoutToolkit:AccordionItem
Header="Business Associates"
Height="Auto" <----- Change this to "100" etc. to prevent Exception from being thrown
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch">
<sdk:DataGrid AutoGenerateColumns="True" Margin="2,5,2,5" Name="grdBusinessAssoc" ItemsSource="{Binding Path=BusinessAssociates.Data}" IsReadOnly="True" />
</layoutToolkit:AccordionItem>
</layoutToolkit:Accordion>
Comments: ** Comment from web user: badboy33 **
The page has a Accordian control with a AccordianItem Child conrol. If I open the page in the VS 2010 Designer, I get the following error:
An Unhandled Exception has Occured:
System.Runtime.Serialization.SerializationException
Type 'System.Windows.LayoutCycleException' in assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' is not marked as serializable.
at MS.Internal.Designer.VSDesignerClient.RestoreSelection(List`1 offsetsInXamlFile)
at MS.Internal.Designer.DesignerPane.LoadDesignerView()
However, if I add a Height="100" (or anything other than 'Auto') property to the AccordianItem then the Page opens. Unfortunatly I need the AccordItem to stretch to Fill the Height of the Accordian control.
Here's a portion of the XAML:
<layoutToolkit:Accordion
Name="accordianList"
Width="Auto"
Height="Auto"
MinHeight="150"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch"
SelectionSequence="Simultaneous"
Margin="0,20,0,20">
<layoutToolkit:AccordionItem
Header="Business Associates"
Height="Auto" <----- Change this to "100" etc. to prevent Exception from being thrown
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch">
<sdk:DataGrid AutoGenerateColumns="True" Margin="2,5,2,5" Name="grdBusinessAssoc" ItemsSource="{Binding Path=BusinessAssociates.Data}" IsReadOnly="True" />
</layoutToolkit:AccordionItem>
</layoutToolkit:Accordion>
Comments: ** Comment from web user: badboy33 **
I had this problem too :
If we had two Accordionitems, then we have to delete VarticalAlignment Property, because setting to stretch for it seems to be in conflit with this object !