×
Namespaces

Variants
Actions

Talk:ExpanderView in Silverlight for Windows Phone Toolkit

From Nokia Developer Wiki
Jump to: navigation, search

Contents

Hamishwillee - Subedited - thanks and some suggestions

Hi Vaishali

Thanks for the article. A useful tool.

I've subedited, mostly for readability. Please check that it still says what you want it to. Note please the following changes so you can consider these for your next articles:

  1. I've used Icode to mark up inline code. This includes ExpanderView everywhere.
  2. Normally I'd make the first mention of ExpanderView a link to the reference for the class. You had a link (which I have removed) because its not clear that the Expander you linked to is exactly the same as an ExpanderView in terms of API reference
  3. I've added SeeAlso with links to other useful documents and tutorials on how to use the component.
  4. I usually use 2 spaces for code indentation.
  5. You correctly explained what IsNonExpandable does - it is useful to also explain why this might be useful, since on the face of it an ExpanderView that doesn't expand is not very useful.

In addition, before creating an article it is worth considering whether you can improve on other articles. There isn't much point in creating a new article unless its better than the existing reference material around the place.

In terms of "room for improvement" this article shows how to include the control in a project. It might be worth also showing how to add the Sliverlight toolkit to your installation (or at least pointing to where this information can be found in the SeeAlso).

You've also shown how to display a hard coded list. What if someone doesn't know what the list is, or wants a more exiting layout. It might well be worth having a section showing how a DataTemplate can be used to define the appearance of the list, and use binding to populate the list. Something to think about anyway!

Lastly, the vertical line to the left of the list looks like it goes a little high (touches the header). Is this something you can control?

Regards

Hamish

hamishwillee 08:35, 8 October 2012 (EEST)

Hamishwillee - Improved title

Note also, I improved the title. It doesn't hurt to say exactly where this comes from, and using the "correct" component name is also good in this case, because it is a meaningful name.

hamishwillee 08:37, 8 October 2012 (EEST)

Vaishali Rawat - Vaishali - @Hamishwillee

Thanks Hamish for the sub-edits and suggestions. Regarding the vertical line going little high, Its the standard functionality of the control. However, this can be controlled/manuplated by using the "EXPANDER" property. Inside that we can use a blank textblock.

Ex:Considering the Xaml Explained in the Article

<toolkit:ExpanderView x:Name="Header1" Header="Teams " FontSize="40" Expanded="Header1_Expanded"/>    
     <toolkit:ExpanderView.Expander>      
                 <Textblock  Height="80" Text=""/>  
     </toolkit:ExpanderView.Expander>
      <toolkit:ExpanderView.Items>      
                  <TextBlock FontSize="20" Text="Afganistan"/>     
                  <TextBlock FontSize="20" Text="Australia"/>      
                  <TextBlock FontSize="20" Text="Bangladesh"/>   
                  <TextBlock FontSize="20" Text="Ireland"/>                 
                 <TextBlock FontSize="20" Text="New Zealand"/>          
                 <TextBlock FontSize="20" Text="South Africa"/>              
                 <TextBlock FontSize="20" Text="Sri Lanka"/>            
                 <TextBlock FontSize="20" Text="Zimbabwe"/>       
      </toolkit:ExpanderView.Items>  
</toolkit:ExpanderView>

Regards,

Vaishali Rawat

Vaishali Rawat 18:42, 14 October 2012 (EEST)

Hamishwillee - Thanks for letting me know

Much appreciated

hamishwillee 08:05, 15 October 2012 (EEST)

Yordanpavlov - Windows Phone Toolkit ExpanderView in depth

For a more in-depth information on the Windows Phone Toolkit ExpanderView control you can take a look at the following articles:

http://www.windowsphonegeek.com/articles/Windows-Phone-Toolkit-ExpanderView-in-depth-Part1-key-concepts-and-API http://windowsphonegeek.com/articles/Windows-Phone-Toolkit-ExpanderView-in-depth-Part2-Data-Binding http://www.windowsphonegeek.com/articles/Expand-and-Collapse-ExpanderView-inside-data-bound-ListBox-via-code

You can find more articles about the Windows Phone Toolkit here: http://www.windowsphonegeek.com/articles/21-WP7-Toolkit-in-Depth-articles-covering-all-controls

And of course in the excellent book here:

http://windowsphonegeek.com/WPToolkitBook2nd

yordanpavlov 13:53, 21 October 2012 (EEST)

Hamishwillee - Yordanpavlov - thanks!

The windowsphonegeek articles and book were already linked in the "seealso" box to top right of page, but I added link to http://www.windowsphonegeek.com/articles/Expand-and-Collapse-ExpanderView-inside-data-bound-ListBox-via-code

I will add a link to http://www.windowsphonegeek.com/articles/21-WP7-Toolkit-in-Depth-articles-covering-all-controls in Silverlight for Windows Phone Toolkit

Thanks very much for pointing these out.

Regards

Hamish

hamishwillee 08:39, 26 October 2012 (EEST)

Dharmendra prajapati - ExpanderView does not show all Items

ExpanderView does not show all Items example i Have more then 100 items when i expand then it show only some items not all

This bellow link is same issue that i face in my app.

http://stackoverflow.com/questions/9929735/expanderview-does-not-show-all-items

dharmendra prajapati (talk) 10:28, 10 May 2014 (EEST)

Xmlsoap - ExpanderView properties not accessible from xaml / intellisense

Thank you for the nice and simple tutorial.

When I tried to add the <toolkit:ExpanderView.Expander> tag - the .Expander property is not available from the intellisense menu and otherwise not recognized.

I encountered this problem before and thought it was because the ExpanderView control was being placed inside a grid - because when I went to a stackpanel the problem went away.

However, that solution does not work here - so I don't think I understand the failure.

If I uncomment out the ExpanderView.Items block in the sample (for Header1) - I get the same problem.

"the member Items is not recognized or is not accessible."

Do you know why this is happening?

thanks.

xmlsoap (talk) 16:28, 11 May 2014 (EEST)

Xmlsoap - xaml basics?

Well, looks like I'm slowly learning.

the problem is solved by adding a separate closing tag to the </toolkit:ExpanderView> and then other ExpanderView properties can be placed inside.

               <toolkit:ExpanderView x:Name="Header1" Header="Teams " FontSize="40" Expanded="Header1_Expanded">
                                   
             
               <toolkit:ExpanderView.Items>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>                      
                       </toolkit:ExpanderView.Items>
</toolkit:ExpanderView>

xmlsoap (talk) 16:43, 11 May 2014 (EEST)

Dharmendra prajapati - ExpanderView does not show all Items

I try this but not working properly Code

     <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
           <ScrollViewer>
               <StackPanel>
                   <toolkit:ExpanderView x:Name="Header1" MaxHeight="5000" Header="Teams " FontSize="40" >
                       <toolkit:ExpanderView.Items>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Afganistan"/>
                           <TextBlock FontSize="20" Text="Australia"/>
                           <TextBlock FontSize="20" Text="Bangladesh"/>
                           <TextBlock FontSize="20" Text="Ireland"/>
                           <TextBlock FontSize="20" Text="New Zealand"/>
                           <TextBlock FontSize="20" Text="South Africa"/>
                           <TextBlock FontSize="20" Text="Sri Lanka"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                           <TextBlock FontSize="20" Text="Zimbabwe"/>
                       </toolkit:ExpanderView.Items>
                   </toolkit:ExpanderView>
               </StackPanel>
           </ScrollViewer>
</Grid>

dharmendra prajapati (talk) 06:17, 12 May 2014 (EEST)

 
×