You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to create transparent tab style with TextBlock and Underline only. But, control always add shadow effect for selected tab. Looks like it is impossible to implement this style.
Steps to reproduce the bug
1)Try to create transparent tab.
2) You see Shadow and CornerRadius for selected tab.
Expected behavior
You able create transparent tab without any shadows and CornerRadius
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.0 (If you're seeing your issue in older previews of WinUI 3, please try this release)
Windows app type
UWP
Win32
Device form factor
Desktop
Windows version
May 2021 Update (19043)
Additional context
Why you always add shadow effect in code behind? (looks like the same problem with corner radius for selected tab)
if (tabView)
{
if (SharedHelpers::IsThemeShadowAvailable())
{
if (internalTabView)
{
winrt::ThemeShadow shadow;
if (!SharedHelpers::Is21H1OrHigher())
{
if (auto shadowReceiver = internalTabView->GetShadowReceiver())
{
shadow.Receivers().Append(shadowReceiver);
}
}
m_shadow = shadow;
double shadowDepth = unbox_value<double>(SharedHelpers::FindInApplicationResources(c_tabViewShadowDepthName, box_value(c_tabShadowDepth)));
const auto currentTranslation = Translation();
const auto translation = winrt::float3{ currentTranslation.x, currentTranslation.y, (float)shadowDepth };
Translation(translation);
UpdateShadow();
}
}
m_tabDragStartingRevoker = tabView.TabDragStarting(winrt::auto_revoke, { this, &TabViewItem::OnTabDragStarting });
m_tabDragCompletedRevoker = tabView.TabDragCompleted(winrt::auto_revoke, { this, &TabViewItem::OnTabDragCompleted });
}
void TabViewItem::UpdateShadow()
{
if (SharedHelpers::IsThemeShadowAvailable() && !XamlControlsResources::IsUsingControlsResourcesVersion2())
{
if (IsSelected() && !m_isDragging )
{
Shadow(m_shadow.as<winrt::ThemeShadow>());
}
else
{
Shadow(nullptr);
}
}
}
The text was updated successfully, but these errors were encountered:
Actually, in retrospect, this is different from #6076. It's a bit like what we discussed in microsoft/terminal#7213 (comment). Because the TabViewItem sets this stuff in codebehind, it's literally impossible to remove certain styling.
Describe the bug
I tried to create transparent tab style with TextBlock and Underline only. But, control always add shadow effect for selected tab. Looks like it is impossible to implement this style.
Steps to reproduce the bug
1)Try to create transparent tab.
2) You see Shadow and CornerRadius for selected tab.
Expected behavior
You able create transparent tab without any shadows and CornerRadius
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.0 (If you're seeing your issue in older previews of WinUI 3, please try this release)
Windows app type
Device form factor
Desktop
Windows version
May 2021 Update (19043)
Additional context
Why you always add shadow effect in code behind? (looks like the same problem with corner radius for selected tab)
The text was updated successfully, but these errors were encountered: