question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] Is it possible to scroll items horizontally in TabsControl?

See original GitHub issue

Hi Andrei, I’m using tab control and CarouselView, I have a requirement to scroll items in horizontally when there are more items

Code

<cardViewControl:TabsControl
                StripeColor="Gold"
                SelectedIndex="{Binding CurrentIndex}"
                BindingContext="{x:Reference caseDetailsListView}">
                    <cardViewControl:TabsControl.ItemTemplate>
                        <DataTemplate>
                           
                            <Label HorizontalTextAlignment="Center"
                               VerticalTextAlignment="Center"
                               HorizontalOptions="FillAndExpand"
                               VerticalOptions="CenterAndExpand"
                              TextColor="White" FontSize="15"
                               FontAttributes="Bold"
                               Text="{Binding pname, Converter={StaticResource CasePaneltoLabelConverter}}"/>
                        </DataTemplate>
                    </cardViewControl:TabsControl.ItemTemplate>
                  </cardViewControl:TabsControl>
                </ContentView>
             
            <cardView:CarouselView  Grid.Row="1"   x:Name="caseDetailsListView" IsCyclical="False" IsVerticalSwipeEnabled="False" OppositePanDirectionDisablingThreshold="1"

image

Any Idea?

Regards, Kalaiy

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AndreiMisiukevichcommented, Jan 8, 2020

Thanks Andrei, But now it throws another issue. Scroll View is not scrolling when CarouselView items moved.

ScrollIssue

Then scroll it yourself when index changing 😃

scrollView.ScrollToAsync(…)

0reactions
kalaiycommented, Jan 8, 2020

@kalaiy if you wish, I can Add autoscrolling in the next release

@AndreiMisiukevich It would be nice to have the auto-scroll feature.

I created in a customized way like this

private void caseDetailsListView_ItemSwiped(PanCardView.CardsView view, PanCardView.EventArgs.ItemSwipedEventArgs args) { if (view.BindingContext != null) { var viewModel = view.BindingContext as MyCaseDetailsViewModel; var stackItems = tabCaseDetails.Children.FirstOrDefault(o => o is StackLayout); if (stackItems != null) { scrollCaseDetails.ScrollToAsync(((StackLayout)stackItems).Children[viewModel.CurrentIndex], ScrollToPosition.Center, true); } } }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Horizontal scrollbar on tabPage
I have just create a tabcontrol, set "AutoScroll" to true, selected the tab page element and added a new panel control (for testing)....
Read more >
TabControl with Horizontal Scrollbar
I know that the tab control will display/add the "scroll buttons" but I need a scrollbar. Any help would be appreciated. Thanks in...
Read more >
Vertical Scroll Bar not on Top of Form which has Tab Control
The user needs to be able to scroll through the different records, rather than using Single Form view. When I open the form,...
Read more >
How to add a horizontal and vertical scroll bar to R Shiny ...
Hi, I have a question regarding adding a horizontal and vertical scroll bars to my R Shiny App to display a complete large...
Read more >
MS Access - Annoying Scroll Issue with Subform/Tab control
--The listbox selection MUST not scroll with the screen and MUST be vertical to the left side. --Each "view" or page must be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found