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

When adding a TabView getting an error #686

Open
amnk2015 opened this issue Jun 18, 2024 · 1 comment
Open

When adding a TabView getting an error #686

amnk2015 opened this issue Jun 18, 2024 · 1 comment
Labels
bug-report Potential bug that should be verified

Comments

@amnk2015
Copy link

amnk2015 commented Jun 18, 2024

I am trying to add a tab inside my page. this is my code. I am getting this error. Please help me to fix this.

Error : System.Reflection.TargetInvocationException: 'Exception has been thrown by the target of an invocation.'

`



material:TabView

        <material:TabItem Title="Tab One">
            <material:TabItem.ContentTemplate>
                <DataTemplate>
                    <Label Text="First Tab" />
                </DataTemplate>
            </material:TabItem.ContentTemplate>
        </material:TabItem>


        <material:TabItem Title="Tab Two">
            <material:TabItem.ContentTemplate>
                <DataTemplate>
                    <Label Text="Second Tab" />
                </DataTemplate>
            </material:TabItem.ContentTemplate>
        </material:TabItem>

        <material:TabItem Title="Tab Three">
            <material:TabItem.ContentTemplate>
                <DataTemplate>
                    <Label Text="Third Tab" />
                </DataTemplate>
            </material:TabItem.ContentTemplate>
        </material:TabItem>
    </material:TabView>

</VerticalStackLayout>
`

@amnk2015 amnk2015 changed the title TabView have three tabs then getting error When adding a TabView getting an error Jun 18, 2024
@enisn enisn added the bug-report Potential bug that should be verified label Jun 20, 2024
@enisn
Copy link
Owner

enisn commented Jun 20, 2024

Hi, have you configured UseUraniumUI() and UseUraniumUIMaterial() in the MauiProgram.cs ?

BTW, do you add tabs dynamically at runtime? If yes can you share how do you add?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Potential bug that should be verified
Projects
None yet
Development

No branches or pull requests

2 participants