Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1084687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:35:40+00:00 2026-05-16T22:35:40+00:00

I am fairly new to silverlight. I am developing on the windows phone platform.

  • 0

I am fairly new to silverlight. I am developing on the windows phone platform.
I want to place a button at the end of the listbox entries which will be bound to data from the webservice (I am using a listbox template)

  • List item 1
  • List item 2
  • List item 3
  • List item 4
  • List item 5
  • List item 6
  • List item 7
  • List item 8
  • ..Button..

I tried number of things of using grid/stackpanel etc to host the button and all my solutions place the button at the bottom of my screen instead of bottom of all the listbox entries which might span multiple screens.

XAML file I have is below. I want to add a button below the “LBoxItems”

<Grid x:Name="LayoutRoot"
      Background="Transparent">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Grid  x:Name="ads" >
        <!--TitlePanel contains the name of the application and page title-->
    <StackPanel Margin="24,24,0,12"
                x:Name="SearchTitle">
        <StackPanel Orientation="Horizontal">
            <TextBlock FontWeight="Bold"
                       FontSize="{StaticResource PhoneFontSizeLarge}"
                       Text="{Binding Location}" />
            <TextBlock FontSize="{StaticResource PhoneFontSizeLarge}"
                       Text=" > " />
            <TextBlock FontWeight="Bold"
                       FontSize="{StaticResource PhoneFontSizeLarge}"
                       Text="{Binding Category}" />
        </StackPanel>
        <TextBlock FontSize="{StaticResource PhoneFontSizeMedium}"
                   Text="{Binding Converter={StaticResource SearchHistoryItemSubTitleConverter}}" />
        </StackPanel>   

    </Grid>
    <!--ContentPanel - place additional content here-->

    <Grid x:Name="ContentGrid"
          Grid.Row="2">            
            <ListBox x:Name="LBoxItems"
                 HorizontalAlignment="Left"
                 Margin="24, 0"
                 SelectionChanged="LBoxItems_SelectionChanged">
                <ListBox.ItemTemplate>
                    <DataTemplate>

                        <StackPanel Margin="{StaticResource PhoneTouchTargetOverhang}" >
                            <TextBlock FontSize="{StaticResource PhoneFontSizeMediumLarge}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Foreground="{StaticResource PhoneAccentBrush}"                                        
                                   Text="{Binding Title.Text}" TextWrapping="Wrap" Margin="-4,20,0,0">
                            </TextBlock>
                            <TextBlock Text="{Binding PublishDate, Converter={StaticResource ItemPublishDateConverter}}" />

                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>             
    </Grid>

    <l:SpinnerControl x:Name="SpinnerControl"
                      Width="55"
                      Height="55"
                      Grid.RowSpan="2" />

    <TextBlock x:Name="TxtNoResultsMessage"
               FontSize="{StaticResource PhoneFontSizeLarge}"
               Text="No results found"
               VerticalAlignment="Center"
               HorizontalAlignment="Center"
               Grid.RowSpan="2"
               Visibility="Collapsed" />
</Grid>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:35:40+00:00Added an answer on May 16, 2026 at 10:35 pm

    You could use a ScrollViewer:

    <ScrollViewer>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="800"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                </Grid.RowDefinitions>
    
                <ListBox Grid.Row="0">
    
                </ListBox>
    
                <Button Grid.Row="1" Height="30" Content="Test"></Button>
            </Grid>
    </ScrollViewer>
    

    Simply divide the Grid inside into two rows, the second one being for the Button.

    For your specific case it would be:

    <Grid x:Name="ContentGrid"
              Grid.Row="2">    
            <ScrollViewer>
              <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="600"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                </Grid.RowDefinitions>
    
                <ListBox x:Name="LBoxItems"
                     HorizontalAlignment="Left"
                     Margin="24, 0"
                     SelectionChanged="LBoxItems_SelectionChanged" Grid.Row="0">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
    
                            <StackPanel Margin="{StaticResource PhoneTouchTargetOverhang}" >
                                <TextBlock FontSize="{StaticResource PhoneFontSizeMediumLarge}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Foreground="{StaticResource PhoneAccentBrush}"                                        
                                       Text="{Binding Title.Text}" TextWrapping="Wrap" Margin="-4,20,0,0">
                                </TextBlock>
                                <TextBlock Text="{Binding PublishDate, Converter={StaticResource ItemPublishDateConverter}}" />
    
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox> 
                <Button Content="Sample" Height="30" Grid.Row="1" />
              </Grid>     
            </ScrollViewer>       
        </Grid>
    

    Of course, you can set the appropriate height depending on your situation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.