V
V
Valentine2019-07-20 18:00:15
Mobile development
Valentine, 2019-07-20 18:00:15

How to scroll tabs on a TabbedPage in Xamarin.Forms instead of making them smaller?

Here's what it looked like when I made a native Android application in Java.
5d332ac82ccc5815353894.png
Here's what it looks like in Xamarin:
5d332b0ee178c332227967.png
Instead of going off screen, the tabs just get smaller. How can I make tabs in my Xamarin.Form project behave the same as in a native android Java project?
Here is the TabbedPage code:
old.xaml:

<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             x:Class="PCApp.Views.Old">

  <ContentPage Title="медицина" />
  <ContentPage Title="юридические услуги" />
  <ContentPage Title="отдых и развлечения" />
  <ContentPage Title="информационный блок" />
  <ContentPage Title="государственные учреждения и общественные организации" />

</TabbedPage>

Old.xaml.cs:
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace PCApp.Views
{
    [XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class Old : TabbedPage
    {
        public Old()
        {
            InitializeComponent();
        }
    }
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valentin, 2019-08-09
@val_gr

I end up using CarouselPage and custom tabs

V
Vyacheslav Zolotov, 2019-07-20
@SZolotov

https://forums.xamarin.com/discussion/55615/wrappi...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question