After running the app, whenever I collapse the datagrid accordion item and then expand it, nothing is displayed inside it.
What's your DataGrid Accordion really mean? Do you mean that you put a DataGrid inside an AccordionItem? I have made a sample with TextBlock on Silverlight3. It works. We suggest that you'd better set the TextBlock's VerticalAlignment="Top" and HorizontalAlignment="Left".
Below is the test case.
If it doesn't work in your case, please feel free to let us know with a tiny repro.
Best regards,
Jonathan
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
Thank you for your reply. It doesn't work in my case.
What does it really mean? Do you mean not all the text shown correctly? If yes, you'd better set its TextWrapping to "Wrap". I have copied your code and test it on Silverlight 3 + IE8/Firefox 3. It works pretty good here. Below is the working sample.
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
Firstly, we would highly recommend you upgrade to Silverlight 3. Secondly, if you insist on using Silvelright 2, please add your TextBlock inside a StackPanel and set its Height and Width to a fixed value. As a suggestion, not work is not enough for our
community members to get the clues, you'd better provide more details. Thanks.
Best regards,
Jonathan
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
hoangtuit
Member
31 Points
55 Posts
Accordion content does not display
Aug 28, 2009 06:24 AM | LINK
I am using Silverlight 2 with the July toolkit edition.
I've placed two simple textblocks inside two accordion items. Width of textblock great than width of accordion.
After running the app, whenever I collapse the datagrid accordion item and then expand it, nothing is displayed inside it.
It does not happen on collapsing and expanding the datagrid accordion first time but rather in the second or third attempts.
Sorry about my EN.
hoangtuit
Member
31 Points
55 Posts
Accordion content does not display
Aug 29, 2009 01:52 AM | LINK
somebody help me.
Jonathan She...
All-Star
50156 Points
4951 Posts
Microsoft
Re: Accordion content does not display
Sep 03, 2009 07:38 AM | LINK
Hi Hoangtuit,
What's your DataGrid Accordion really mean? Do you mean that you put a DataGrid inside an AccordionItem? I have made a sample with TextBlock on Silverlight3. It works. We suggest that you'd better set the TextBlock's VerticalAlignment="Top" and HorizontalAlignment="Left". Below is the test case.
If it doesn't work in your case, please feel free to let us know with a tiny repro.
Best regards,
Jonathan
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
hoangtuit
Member
31 Points
55 Posts
Re: Accordion content does not display
Sep 04, 2009 01:25 AM | LINK
Hi Jonathan,
Thank you for your reply. It doesn't work in my case.
This is my demo code:
<
UserControl xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit" x:Class="Test.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="400" Height="300"> <Grid x:Name="LayoutRoot" Background="White"> <layoutToolkit:Accordion HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="170" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"> <layoutToolkit:AccordionItem> <layoutToolkit:AccordionItem.Header> <TextBlock Text="Group 1" VerticalAlignment="Center" /> </layoutToolkit:AccordionItem.Header> <layoutToolkit:AccordionItem.Content> <TextBlock Text="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" VerticalAlignment="Top" HorizontalAlignment="Left" /> </layoutToolkit:AccordionItem.Content> </layoutToolkit:AccordionItem> <layoutToolkit:AccordionItem> <layoutToolkit:AccordionItem.Header> <TextBlock Text="Group 2" VerticalAlignment="Center" /> </layoutToolkit:AccordionItem.Header> <layoutToolkit:AccordionItem.Content> <TextBlock Text="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" VerticalAlignment="Top" HorizontalAlignment="Left" /> </layoutToolkit:AccordionItem.Content> </layoutToolkit:AccordionItem> </layoutToolkit:Accordion> </Grid></
UserControl>Jonathan She...
All-Star
50156 Points
4951 Posts
Microsoft
Re: Accordion content does not display
Sep 04, 2009 02:53 AM | LINK
Hi Hoangtuit,
What does it really mean? Do you mean not all the text shown correctly? If yes, you'd better set its TextWrapping to "Wrap". I have copied your code and test it on Silverlight 3 + IE8/Firefox 3. It works pretty good here. Below is the working sample.
Best regards,
Jonathan
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
hoangtuit
Member
31 Points
55 Posts
Re: Re: Accordion content does not display
Sep 05, 2009 01:29 AM | LINK
Hi Jonathan,
It is not works for me. I use Silverlight 2 + July toolkit edition + IE8/Firefox 3.
Jonathan She...
All-Star
50156 Points
4951 Posts
Microsoft
Re: Re: Accordion content does not display
Sep 07, 2009 03:53 AM | LINK
Hi Hoangtuit,
Firstly, we would highly recommend you upgrade to Silverlight 3. Secondly, if you insist on using Silvelright 2, please add your TextBlock inside a StackPanel and set its Height and Width to a fixed value. As a suggestion, not work is not enough for our community members to get the clues, you'd better provide more details. Thanks.
Best regards,
Jonathan
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework
hoangtuit
Member
31 Points
55 Posts
Re: Re: Accordion content does not display
Sep 08, 2009 03:52 AM | LINK
Hi Jonatha,
Thanks for your reply.
I built GUI at runtime.
I added my TextBlock inside a Scrollviewer and then added Scrollviewer inside AccordionItem.
Everything is ok. but when Scrollviewer appear HorizontalScrollBar, it is not work.
Sorry about my en.