Sharpnado.Tabs
Sharpnado.Tabs copied to clipboard
Error XFC0000: Cannot resolve type "tabs:TabHostView"
If you end up with this error, it means you forgot to call the Sharpnado.Tabs.Initializer.Initialize() in your App.xaml.cs. Have a look here: https://github.com/roubachof/Sharpnado.Tabs#installation
hi @roubachof, I am getting error XFC0000 any time I make a change to my xaml file. But it does not stop the app from compiling or running as expected though. Note I am running VS for Mac
/TestTabControlPage.xaml: Error: : XamlC error XFC0000 : Cannot resolve type "TabHostView".
I have added the initialiser statement to my App.xaml.cs
Errors in error window when ever I change the xaml file,Note if I quit VS and reopen the solution the errors go away until I modify the file :
Nuget packages installed:
What am I missing?
Thanks, Brent
My bet would be a vs mac issue since like you said its still compiling and running fine
I think your right, it must be a bug with VS for Mac, it seems to have a problem with x:name, removing references to x:name removes the error for me:
<tabs:TabHostView
Grid.Row="1"
Margin="-16,0"
BackgroundColor="{StaticResource SecondaryUltraLight}"
SelectedIndex="{Binding SelectedViewModelIndex, Mode=TwoWay}">
<tabs:TabHostView.Tabs>
<tabs:UnderlinedTabItem Style="{StaticResource TabStyle}" Label="Details"/>
<tabs:UnderlinedTabItem Style="{StaticResource TabStyle}" Label="ETS" />
<tabs:UnderlinedTabItem Style="{StaticResource TabStyle}" Label="Items" />
</tabs:TabHostView.Tabs>
</tabs:TabHostView>
<ScrollView Grid.Row="2" Padding="{StaticResource PaddingSmall}">
<tabs:ViewSwitcher
Animate="True"
SelectedIndex="{Binding SelectedViewModelIndex, Mode=TwoWay}">
<controls:TestTabDetailView Animate="False" BindingContext="{Binding Details}" />
<controls:TestTabView Animate="False" BindingContext="{Binding Ets}" />
<controls:TestTabView Animate="False" BindingContext="{Binding Items}" />
</tabs:ViewSwitcher>
</ScrollView>
i have this issue as well. on pc. initialized as follow in app.xaml.cs
Sharpnado.Shades.Initializer.Initialize(false);
Sharpnado.Tabs.Initializer.Initialize(true, true);
have tried different combinations, no luck
Yup, you can fill a bug with the visual studio team.
For all reading this issue. If you see those errors but your project compiles and runs fine, this is a cosmetic VS issue.
Also, there is specific versions of Xamarin.Forms that cause this issue (4.7):
https://github.com/xamarin/Xamarin.Forms/issues/11101
For all reading this issue. If you see those errors but your project compiles and runs fine, this is a cosmetic VS issue.
Not certainly in that way. Because of this error, the Intellisence does not work for me. Also, not work hot reload, but I'm not sure what for this reason(XF 4.8.0.1687)
Definitely not a mac issue. I have the same issue in VS on windows.
I did have success with using the explicit xmlns for Tabs-controls. The compile error disappeared and Hot Reload started working again.
xmlns:tab="clr-namespace:Sharpnado.Tabs;assembly=Sharpnado.Tabs"
I did have success with using the explicit xmlns for Tabs-controls. The compile error disappeared and Hot Reload started working again.
xmlns:tab="clr-namespace:Sharpnado.Tabs;assembly=Sharpnado.Tabs"
Eh, unfortunately I still getting error in .Net 8.0
1>OrdersPage.xaml: Error XamlC: Failed to resolve assembly: 'Sharpnado.Tabs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
For that I was used same solution:
Using:
xmlns:tabs="clr-namespace:Sharpnado.Tabs;assembly=Sharpnado.Tabs"
Styles:
<Style x:Key="SegmentedTabStyle" TargetType="tabs:SegmentedTabItem">
<Setter Property="SelectedTabColor" Value="{StaticResource LightBackgroundColor}" />
<Setter Property="LabelSize" Value="14" />
<Setter Property="SelectedLabelColor" Value="{StaticResource AccentColor}" />
<Setter Property="UnselectedLabelColor" Value="{StaticResource PrimaryColor}" />
</Style>
<Style x:Key="TabHostStyle" TargetType="tabs:TabHostView">
<Setter Property="IsSegmented" Value="True" />
<Setter Property="TabType" Value="Fixed" />
<Setter Property="CornerRadius" Value="10" />
<Setter Property="HeightRequest" Value="40" />
<Setter Property="BackgroundColor" Value="{StaticResource SegmentBackgroundColor}" />
</Style>
Usage of Control:
<tabs:TabHostView
SelectedIndex="{Binding SelectedTabIndex, Mode=TwoWay}"
Style="{StaticResource TabHostStyle}"
VerticalOptions="Center">
<tabs:TabHostView.Tabs>
<tabs:SegmentedTabItem Label="{translate:Translate AllOrders}" Style="{StaticResource SegmentedTabStyle}" />
<tabs:SegmentedTabItem Label="{translate:Translate AwaitingOrders}" Style="{StaticResource SegmentedTabStyle}" />
<tabs:SegmentedTabItem Label="{translate:Translate DeliveredOrders}" Style="{StaticResource SegmentedTabStyle}" />
</tabs:TabHostView.Tabs>
</tabs:TabHostView>