-
Notifications
You must be signed in to change notification settings - Fork 62
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
Error XFC0000: Cannot resolve type "tabs:TabHostView" #5
Comments
hi @roubachof,
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 : What am I missing? Thanks, |
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:
|
i have this issue as well. on pc. initialized as follow in app.xaml.cs
have tried different combinations, no luck |
Yup, you can fill a bug with the visual studio team. |
For all reading this issue. |
Also, there is specific versions of Xamarin.Forms that cause this issue (4.7): |
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.
|
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> |
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
The text was updated successfully, but these errors were encountered: