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

  • SEARCH
  • Home
  • 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 8265067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:40:11+00:00 2026-06-08T04:40:11+00:00

I want to align the contents or items of ExpanderView in horizontal layout instead

  • 0

I want to align the contents or items of ExpanderView in horizontal layout instead of vertical layout. The ExpanderHeader is set dynamically and also its contents are added dynamically.
The xaml part and CustomeItemTemplate in app.xaml is as below

    <toolkit:ExpanderView 
         Width="470" 
         Header="{Binding TaskName, Mode=TwoWay}"
          x:Name="taskNameExpander"
          Margin="5,10,5,10"
          Foreground="#FF677389" FontSize="24"   VerticalAlignment="Top"
          HorizontalAlignment="Left"
          ItemsSource="{Binding dateTime}" 
          ItemTemplate="{StaticResource CustomItemTemplate}"
          HorizontalContentAlignment="Left">
   </toolkit:ExpanderView>



<DataTemplate x:Key="CustomItemTemplate">

       <StackPanel Orientation="Horizontal" Height="60" >
            <TextBlock FontSize="16" Text="{Binding Date, Mode=OneWay}"  
            TextWrapping="Wrap" Foreground="#FF677389" Margin="0,6,0,0" Height="30" Width="100"/>
            <TextBox BorderBrush="Goldenrod" BorderThickness="1" FontSize="16" Text="{Binding Time, Mode=TwoWay}" TextWrapping="Wrap" Foreground="#FF677389" Margin="0" Height="60" Width="150"/>
        </StackPanel>


  </DataTemplate>

Still i get the contents aligned vertically. Can someone point me what am i doing wrong here?


here is the sample code you have asked for

         <Border BorderBrush="White" BorderThickness="1" Margin="5">
                            <ScrollViewer Width="Auto" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Disabled">
                            <toolkit:ExpanderView 
                                Width="1600" 
                                Header="{Binding TaskName, Mode=TwoWay}"
                                x:Name="taskNameExpander" Margin="5,10,5,10" Foreground="#FF677389" FontSize="24" VerticalAlignment="Top" HorizontalAlignment="Left"
                                ItemsSource="{Binding dateTime}" 
                                ItemTemplate="{StaticResource CustomItemTemplate}"
                                ScrollViewer.HorizontalScrollBarVisibility="Visible"
                                HorizontalContentAlignment="Left">
                                <toolkit:ExpanderView.ItemsPanel>
                                    <ItemsPanelTemplate >
                                        <StackPanel Orientation="Horizontal" Width="Auto" ScrollViewer.HorizontalScrollBarVisibility="Visible"/>

                                    </ItemsPanelTemplate>
                                </toolkit:ExpanderView.ItemsPanel>

                            </toolkit:ExpanderView>
                            </ScrollViewer>


                        </Border>

and my app.xaml has CustomItemTemplate definition as below

  <DataTemplate x:Key="CustomItemTemplate">
        <StackPanel Orientation="Vertical" Height="100" >
            <TextBlock FontSize="16" Text="{Binding Date, Mode=OneWay}" TextWrapping="Wrap" Foreground="#FF677389" Margin="0,6,0,0" Height="30" Width="100"/>
            <TextBox BorderBrush="Goldenrod" BorderThickness="1" FontSize="16" Text="{Binding Time, Mode=TwoWay}" TextWrapping="Wrap" Foreground="#FF677389" Margin="0" Height="60" Width="150">
            <TextBox.InputScope>

                <InputScope >
                    <InputScopeName NameValue="Number"></InputScopeName>

                </InputScope>

            </TextBox.InputScope>
            </TextBox>
        </StackPanel>
    </DataTemplate>

I want to horizontally scroll only ExpanderView items. Rightnow it is scrolling but the whole ExpanderView is scrolling including its header. The header must be intact and only the items must scroll. How can i acheive it?

  • 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-06-08T04:40:14+00:00Added an answer on June 8, 2026 at 4:40 am

    You should set the ItemsPanel for the ExpanderView control.

    <toolkit:ExpanderView 
                         Width="470" Height="100"
                          x:Name="taskNameExpander"
                          Margin="5,10,5,10"
                          FontSize="24" Background="White"
                          HorizontalAlignment="Left"
                          ItemsSource="1 2 3 4" 
                          ItemTemplate="{StaticResource CustomItemTemplate}"
                          HorizontalContentAlignment="Left">
                        <toolkit:ExpanderView.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal"/>
                            </ItemsPanelTemplate>
                        </toolkit:ExpanderView.ItemsPanel>
                </toolkit:ExpanderView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want align the div to center. like this I have tried margin-top, vertical-align
I want to align two buttons with a linear layout, one on the left,
I just want to confirm that android's GridView only supports horizontal gravity for its
In a horizontal listbox how do I align items to the top? I have
I want to right-align the contents that are displayed in a vertically oriented StackPanel
I want to align the buttons as shown bellow, for this, I used relative
I want to align my logo at the top but failed to do so
i want to align two textboxes with their display names ,side by side in
I want to align some text to the top of a div. It seems
I want to align a Custom Button Field (the Star on the Screenshot) to

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.