TabControls fails in Window

2 Answers 235 Views
TabControl
Alan
Top achievements
Rank 1
Iron
Iron
Iron
Alan asked on 17 May 2022, 07:35 PM

This works:

<Window
    x:Class="xxxxxx"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerik="using:Telerik.UI.Xaml.Controls" 
    mc:Ignorable="d">
    <Grid>
        <TabView>
            <TabView.TabItems>
                <TabViewItem Header="CMD Prompt"/>
                <TabViewItem Header="PowerShell"/>
                <TabViewItem Header="Windows Subsystem for Linux"/>
            </TabView.TabItems>
        </TabView>
    </Grid>
</Window>


This does not due to the following. Using all of the latest nuget packages (2.0). I suspect it is related to being in a Window vs a control:

Microsoft.UI.Xaml.Markup.XamlParseException
  HResult=0x802B000A
  Message=XAML parsing failed.
  Source=WinRT.Runtime
  StackTrace:
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr)

<Window
    x:Class="xxxxxx"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:telerik="using:Telerik.UI.Xaml.Controls" 
    mc:Ignorable="d">
    <Grid>
        <telerik:RadTabControl>
            <telerik:RadTabControl.Items>
                <telerik:RadTabItem Header="Tab 1" Content="The content of tab item 1"/>
                <telerik:RadTabItem Header="Tab 2" Content="The content of tab item 2"/>
                <telerik:RadTabItem Header="Tab 3" Content="The content of tab item 3"/>
                <telerik:RadTabItem Header="Tab 4" Content="The content of tab item 4"/>
            </telerik:RadTabControl.Items>
        </telerik:RadTabControl>
    </Grid>
</Window>

2 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 18 May 2022, 08:09 AM

Hello Alan,

We will need more information regarding this case. Could you please add the following details:

     - what type of application do you create - WinUI fir UWP / Desktop

     - which versions of VS and WinUI do you use ?

Can you send us the application if it is isolated one, not part of a bigger project ? Thank you in advance.

Regards,
Petar Mladenov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Alan
Top achievements
Rank 1
Iron
Iron
Iron
answered on 18 May 2022, 02:45 PM

WinUI for desktop, latest version

VS 2022 CE, latest version

All nuget packages to date. I just replicated it on a clean project, which is attached.

 

Petar Mladenov
Telerik team
commented on 19 May 2022, 08:24 AM

Thank you for your project.
Please check the getting started steps listed here:
https://docs.telerik.com/devtools/winui/getting-started/first-steps-nuget

I think the essential step you miss is 5 (adding styles for the telerik controls). Please give it a try and let us know how it goes.

Alan
Top achievements
Rank 1
Iron
Iron
Iron
commented on 19 May 2022, 07:47 PM

Ok, that worked: thank you.

I am not sure what can be done here but the generic failure doesn't tell us what happened. I would suggest some other means of flagging it or loading it if not found.

Petar Mladenov
Telerik team
commented on 20 May 2022, 10:18 AM

Hi Alan,
Thank you for this suggestion but I'm afraid this is an internal message in WinUI and we have no control at this level.
Tags
TabControl
Asked by
Alan
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Petar Mladenov
Telerik team
Alan
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or