Open ketakidevendra opened 9 months ago
Can you provide platform information? Which platform does this problem occur on? and which version?
.NET 8 Android
On Tue, 23 Jan, 2024, 15:28 Enis Necipoglu, @.***> wrote:
Can you provide platform information? Which platform does this problem occur on? and which version?
— Reply to this email directly, view it on GitHub https://github.com/enisn/UraniumUI/issues/551#issuecomment-1905694335, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMY57NP2ZOWYNUNURUOO5M3YP6CWBAVCNFSM6AAAAABCGUCZB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBVGY4TIMZTGU . You are receiving this because you authored the thread.Message ID: @.***>
The same on UraniumUI 2.7.4 & 2.8.0-pre.2 .Net 8 Windows
You can share if you have logs of the crash.
I couldn't reproduce it in Release mode. Did you publish the application?
You can share if you have logs of the crash.
I couldn't reproduce it in Release mode. Did you publish the application?
It doesn't crash just headers don't appear.
As workaround I added grid and it helped. When I have:
<material:TabView.TabHeaderItemTemplate>
<DataTemplate>
<Grid
HeightRequest="80"
BackgroundColor="Azure">
<Label
Padding="4"
Background="Transparent"
FontFamily="OnestRegular"
FontSize="14"
HorizontalOptions="CenterAndExpand"
LineBreakMode="TailTruncation"
Text="{Binding Title, Converter={StaticResource TextCaseConverter}}">
<Label.Triggers>
<DataTrigger
Binding="{Binding IsSelected}"
TargetType="Label"
Value="True">
<Setter Property="TextColor" Value="{DynamicResource SelectedTextColor}" />
</DataTrigger>
<DataTrigger
Binding="{Binding IsSelected}"
TargetType="Label"
Value="False">
<Setter
Property="TextColor"
Value="{DynamicResource SecondaryTextColor}" />
</DataTrigger>
</Label.Triggers>
</Label>
</Grid>
</DataTemplate>
</material:TabView.TabHeaderItemTemplate>
I get:
When I have:
<material:TabView.TabHeaderItemTemplate>
<DataTemplate>
<Label
Text="{Binding Title,
Converter={StaticResource TextCaseConverter}}"
Background="Transparent"
FontSize="14"
Padding="4"
LineBreakMode="TailTruncation"
HorizontalOptions="CenterAndExpand"
FontFamily="OnestRegular">
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding IsSelected}"
Value="True">
<Setter
Property="TextColor"
Value="{DynamicResource SelectedTextColor}" />
</DataTrigger>
<DataTrigger
TargetType="Label"
Binding="{Binding IsSelected}"
Value="False">
<Setter
Property="TextColor"
Value="{DynamicResource SecondaryTextColor}" />
</DataTrigger>
</Label.Triggers>
</Label>
</DataTemplate>
</material:TabView.TabHeaderItemTemplate>
I get:
Thanks for your workaround, I should wrap the header with a ContentView or Grid.
I'll try to handle it. Thanks for defining the problem 🙏
@enisn - Unfortunately workaround mentioned above did not work for me in android. Is it possible to fix it?
I ran into this issue today, and the Grid/ContentView workaround also didn't work for me.
While troubleshooting, I noticed that the Label text rendered correctly when hardcoded (not using a Binding).
I got it to work by setting the DataType on the DataTemplate.
From this:
<DataTemplate>
to this:
<DataTemplate x:DataType="uui:TabItem">
@ketakidevendra, maybe this will work for you?
any solution for this problem? I am currently seeing it in .NET 8 Android 2.8.1 @GoSupportAfk
@enisn Not sure if possibly also related to issues observed in https://github.com/enisn/UraniumUI/issues/663#issuecomment-2229023198
I have used a custom header template like in sample below. It works in debug mode but in release mode tabs become invisible. Version I am referring is 2.7.4.
Example: