enisn / UraniumUI

Uranium is a Free & Open-Source UI Kit for MAUI.
Apache License 2.0
1.17k stars 142 forks source link

Unresolved TabItem building TabView for Windows #369

Closed JRosanowski closed 1 year ago

JRosanowski commented 1 year ago

When building for Windows I'm getting the following error. There's no problem building for Android. XFC0000 Cannot resolve type "http://schemas.enisn-projects.io/dotnet/maui/uraniumui/material:material:TabItem".

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
  x:Class="TestApp.TabViewPage"
  xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  xmlns:material="http://schemas.enisn-projects.io/dotnet/maui/uraniumui/material"
  Title="MainPage">
  <VerticalStackLayout>
    <material:TabView TabPlacement="Bottom">

      <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:TabView>
  </VerticalStackLayout>
enisn commented 1 year ago

Can you try this? https://github.com/enisn/UraniumUI/issues/141#issuecomment-1354519183

xmlns:material="clr-namespace:UraniumUI.Material.Controls;assembly=UraniumUI.Material"

somehow some .NET SDKs can't resolve exported types 🤔

JRosanowski commented 1 year ago

Sorry, this is my fault. I hadn't added .UseUraniumUIMaterial() to the Maui AppBuilder.