Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fontsize tabbedPage not working #27606

Closed
Cav-jj opened this issue Feb 6, 2025 · 2 comments
Closed

fontsize tabbedPage not working #27606

Cav-jj opened this issue Feb 6, 2025 · 2 comments
Labels
area-controls-tabbedpage TabbedPage platform/iOS 🍎 s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity t/bug Something isn't working

Comments

@Cav-jj
Copy link

Cav-jj commented Feb 6, 2025

Description

fontsize tabbedPage not working

Steps to Reproduce

public class MyTabbedRenderer : Microsoft.Maui.Controls.Handlers.Compatibility.TabbedRenderer
{
    public MyTabbedRenderer()
    {
        if (OperatingSystem.IsIOSVersionAtLeast(18))
        {
            //old tab index lock on newer version
            TraitOverrides.HorizontalSizeClass = UIUserInterfaceSizeClass.Compact;

        }
    }

    public override void ViewWillAppear(bool animated)
    {
        base.ViewWillAppear(animated);

        BiggerFonts();
    }

    private void BiggerFonts()
    {
        nfloat f = 16f;

        var textAtributes = new UIStringAttributes();
        textAtributes.Font = UIFont.SystemFontOfSize(f);
      

        foreach (var controller in ViewControllers)
        {
            controller.TabBarItem.SetTitleTextAttributes(textAtributes, UIControlState.Normal);
            controller.TabBarItem.SetTitleTextAttributes(textAtributes, UIControlState.Selected);
        }

    }
}

MauiProgram

builder.ConfigureMauiHandlers(handlers =>{handlers.AddHandler<TabbedPage, MyTabbedRenderer>();});

Link to public reproduction project repository

No response

Version with bug

8.0.100 SR10

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

all

Did you find any workaround?

No response

Relevant log output

@Cav-jj Cav-jj added the t/bug Something isn't working label Feb 6, 2025
@jsuarezruiz jsuarezruiz added platform/iOS 🍎 area-controls-tabbedpage TabbedPage s/needs-repro Attach a solution or code which reproduces the issue labels Feb 6, 2025
Copy link
Contributor

Hi @Cav-jj. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@dotnet-policy-service dotnet-policy-service bot added the s/no-recent-activity Issue has had no recent activity label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-tabbedpage TabbedPage platform/iOS 🍎 s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants