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.

Proposal: Add lightweight styling resource(s) for TabView's Separator

See original GitHub issue

Proposal: Add lightweight styling resource(s) for TabView’s Separator

Summary

Currently, the margin of the TabView’s Separator cannot be easily modified:

<Border x:Name="TabSeparator"
      HorizontalAlignment="Right"
      Width="1"
      BorderBrush="{ThemeResource TabViewItemSeparator}"
      BorderThickness="1"
      Margin="0,6,0,6"/>

This proposal would expose this value via a resource to enable easy styling. Proposed resources:

  • TabViewItemSeparatorMargin

This will enable TabView’s item separator to be styled like Edge UWP’s TabView separator, for example:

image

Edge UWP: image

Open Questions

Should we also expose the width of the separator as a resource? On first glance, this could create issues with the shadow casting and tab item layout in general (i.e. overlaying the casted shadow on the left & shrinking the space between the close button of the previous tab and the beginning of the next tab).

Additional Context

If approved, I would look like to work on this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Felix-Devcommented, Jun 3, 2020

@stmoy The motivation for this proposal is to make styling the TabView (here: the TabViewItemSeparator) as easy as possible for developers without having to retemplate the control. This light-weight styling resource could be used to create a TabView UI matching the Community Toolkit’s TabView look but it doesn’t have to. Developers/Designers can just pick any margin for the TabViewItemSeparator they favor.

In terms of names, I’m conflicted about TabViewSeparatorMargin, as it really describes the height of the line, right? But I guess the height is determined by a Margin so, maybe the name is appropriate.

The proposed theme resource works on the Margin property of the TabViewItemSeparator. It can be used to control the height of the separator but since it sets a margin, on paper not only the height can bet set but also the position of the separator in relation to the surrounding TabViewItems. As such, I find it proper to make this relationship clear in the naming of the theme resource - you can modify the separator’s margin and not just strictly its height.

0reactions
mdtaukcommented, Jun 4, 2020

This should be worked into this proposal I think. #2587

Depends. @Felix-Dev, is the motivation for this work to make the TabView look more like the one from Windows Community Toolkit? If so, agree that this should probably be bundled alongside #2587.

However, I think having more customizable light-weight styling keys seems like a righteous thing in general.

In terms of names, I’m conflicted about TabViewSeparatorMargin, as it really describes the height of the line, right? But I guess the height is determined by a Margin so, maybe the name is appropriate.

I was thinking more about how @chingucoding would be able to apply a style to the TabView control, which would allow him to change the separator style between both Edge and Legacy Edge styles.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TabView should get a TabViewItemSeparatorForeground ...
Proposal : TabView should get a TabViewItemSeparatorForeground theme resource to style the tab separator Summary WinUI currently uses a theme ...
Read more >
A Complete Guide To Accessible Front-End Components
An up-to-date collection of accessible front-end components: accordions, form styles, dark mode, data charts, date pickers, form styles, ...
Read more >
Accordion FAQ with Category Plugin
Responsive FAQ plugin with Accordion and Category for Elementor and page builders. Add FAQ with collapse and toggle activator easily.
Read more >
Color accessibility: tools and resources to help you design ...
All the tools, tips and resources your need to build and check the color accessibility and color constrast of digital products!
Read more >
Properties View Tabs
The tabs on a Properties view provide easy access to the many properties you ... General Tab, Specify a CSS class to 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