UWP TabView RepeatButton

113 Views Asked by At

I have a problem with a RepeatButton in a TabView, I don't know how to resize it so that they are in height as adjacent elements

enter image description here

<controls:TabView 
        Width="400"
        AddTabButtonClick="TabView_AddTabButtonClick" 
        TabCloseRequested="TabView_TabCloseRequested" 
        Loaded="TabView_Loaded">

        <controls:TabView.TabItems>
            <controls:TabViewItem Header="Something" Height="50"/>

            <controls:TabViewItem Header="Something"/>

            <controls:TabViewItem Header="Something"/>

            <controls:TabViewItem Header="Something"/>

            <controls:TabViewItem Header="Something"/>

            <controls:TabViewItem Header="Something"/>

            <controls:TabViewItem Header="Something"/>

            <controls:TabViewItem Header="Something"/>
            <controls:TabViewItem Header="Something"/>

        </controls:TabView.TabItems>

I found a similar problem, but I still don't understand how to solve UWP TabView scroll button

How can I set RepeatButton sizes?

1

There are 1 best solutions below

0
On BEST ANSWER

If you want to set the Height of the RepeatButton of TabView, you could do it in a style of TabView. Open the style document of TabView, you could see the two RepeatButtons are in the Style named TabScrollViewerStyle.

Please check the follow steps:

  1. Open the Document Outline panel, right-click your TabView and select Edit Template > Edit a Copy. Then your TabView will apply the copied style automatically.
  2. Copy the code from line 99 to line 229 below the copied style.
  3. Copy the necessary xmlns(contract4Present, primitives, contract7NotPresent, contract7Present, primitiveContract7Present and so on) of ResourceDictionary into the Page element of your xaml file
  4. Find the two RepeatButtons and set the value of Height property as 50.
  5. Build your project.