This is a migrated thread and some comments may be shown as answers.

Windows8Touch Them messes up TabControl Align in vertical mode

3 Answers 39 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Joe asked on 17 Nov 2020, 11:12 PM

When I set the StyleManager.ApplicationTheme to Windows8Touch, it breaks the RadTabControl's Align functionality.

To explain, I created a simple Telerik application whose main window consisted of a RadTabControl.  The controls tabs are on the left hand side and I use  Align="Justify" to make them space out evenly on that left side (taking up all the available space).  It looks great

<Grid>
         
    <tk:RadTabControl
        VerticalAlignment="Stretch"
        Align="Justify"
        TabStripPlacement="Left"
        TabOrientation="Vertical"
         
        >
        <tk:RadTabItem Header="First"/>
        <tk:RadTabItem Header="Second"/>
        <tk:RadTabItem Header="Third"/>
    </tk:RadTabControl>
</Grid>


But THEN I go into main MainWindow constructor and place this just before the call to InitializeComponent()

StyleManager.ApplicationTheme = new Windows8TouchTheme();


Suddenly the Align="Justify" stops working.  The tab control buttons are all aligned at the top

I've attached images showing you what I mean.  "BeforeTheme.jpg" is the application without the Windows8Theme, buttons nicely spead out.
"WithWindows8Theme.jpg". shows after I add it and the problem.

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 20 Nov 2020, 01:52 PM

Hello Joe,

Thank you for the provided details.

I was able to reproduce this behavior using the described steps. Therefore I have logged it in our Feedback Portal where you can track its progress. By subscribing to the item you will be notified when we planned this behavior for fixing. I am afraid that at this moment I can't suggest a workaround for this.

I have updated your Telerik Points for bringing this behavior to our attention.

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 20 Nov 2020, 03:02 PM
Hi Dinko,

Thanks for letting me know.  I thought I was just doing it wrong, somehow.

I came up with my own workaround.  I defined the ItemsPanelTemplate and just set the ItemWidth manually.  (Since it's vertical, ItemWidth becomes "height")   It's a true hack and hard-coded but it will get me by for now. 

If I wanted to be fancy I could replace the "300" with a binding to some read-only Dependency property on the control that actually did the calculation I needed (by responding as window is resized) but I think this will get me by

<tk:RadTabControl.ItemsPanel>
    <ItemsPanelTemplate>
        <WrapPanel HorizontalAlignment="Right" Orientation="Horizontal" ItemWidth="300" />
    </ItemsPanelTemplate>
</tk:RadTabControl.ItemsPanel>


0
Dinko | Tech Support Engineer
Telerik team
answered on 24 Nov 2020, 12:15 PM

Hello Joe,

I am happy to hear that you have found a workaround for this behavior, and thank you for sharing it with the community. You can consider using this approach till this behavior is resolved at our side. We will update the Feedback Item when we start working on it.

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TabControl
Asked by
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Dinko | Tech Support Engineer
Telerik team
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or