RadCartesianChart... "Cannot find type Microsoft.UI.Composition.SpriteVisual in module Microsoft.WinUI.dll"

1 Answer 176 Views
Chart
William
Top achievements
Rank 1
Iron
William asked on 31 Aug 2021, 08:00 PM

Hey guys. Took a clip from your WinUI demo. Attached as simple user control. Using this version of WinUI SDK (from project file) and I get this odd error. How did you guys get that to work? If you want I can create a complete project. Demo source would help. Thanks. 

  <ItemGroup>
    <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-experimental1" />
    <PackageReference Include="Microsoft.WindowsAppSDK.Foundation" Version="1.0.0-experimental1" />
    <PackageReference Include="Microsoft.WindowsAppSDK.WinUI" Version="1.0.0-experimental1" />
    <PackageReference Include="Microsoft.WindowsAppSDK.InteractiveExperiences" Version="1.0.0-experimental1" />
    <Manifest Include="$(ApplicationManifest)" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Telerik.WinUI.Controls.Trial" Version="0.4.0" />
    <Manifest Include="$(ApplicationManifest)" />
  </ItemGroup>

1 Answer, 1 is accepted

Sort by
1
Accepted
Dilyan Traykov
Telerik team
answered on 02 Sep 2021, 09:40 AM

Hello William,

Thank you for the provided code snippets.

For the time being, the Telerik UI for WinUI controls do not work with the experimental version of WindowsAppSDK. They do work with the 0.8.0-preview version of ProjectReunion, however. Thus, you can replace the WindowsAppSDK references with the following:

    <PackageReference Include="Microsoft.ProjectReunion">
      <Version>0.8.0-preview</Version>
    </PackageReference>

As per your request, I've prepared a small sample project based on the code you provided which correctly displays the RadCartesianChart control at my end.

Can you please have a look and let me know if you're also able to successfully build and run the project on your machine? I will be awaiting your reply.

Regards,
Dilyan Traykov
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/.

William
Top achievements
Rank 1
Iron
commented on 02 Sep 2021, 07:40 PM

Hey Dilyan,

Yes that was the problem. I realized that late last night when reading the requirement's for Telerik WinUI. If all else fails read the directions right? Sorry about that. 

I updated your original test (updated to used Telerik WinUI trial) and created two other projects. App1Renunion was created with the public reunion extension templates and App1Sdk with the extension templates for WinSdk. 

App1Reuion works just fine and obviously App1Sdk will not build.

Thanks again. You guys are awesome. 

NOTE: I would send you the zipped projects but your file attachment limit is to small.

Dilyan Traykov
Telerik team
commented on 03 Sep 2021, 10:54 AM

Hello William,
I'm happy to hear that you've now built a working project successfully.
I do not believe attaching the projects would be necessary, but if you do want to provide them, you can delete the bin and obj folders to decrease their size.
Nonetheless, if I can further assist you with anything else, please let me know.
William
Top achievements
Rank 1
Iron
commented on 09 Sep 2021, 05:37 PM

Help! Got another one. I used the example you gave me and replaced the Chart with a DataGrid...

    xmlns:grid="using:Telerik.UI.Xaml.Controls.Grid" 

     <grid:RadDataGrid AutoGenerateColumns="False"
                                 SelectionMode="Single"
                                 SelectionUnit="Row"                                 
                                 >
                <grid:RadDataGrid.Columns>
                    <grid:DataGridTextColumn Header="Name"/>
                </grid:RadDataGrid.Columns>
            </grid:RadDataGrid>

I get this...

System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
   at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize)
   at Telerik.UI.Xaml.Controls.Grid.DataGridColumn.MeasureCellContainer(Double availableWidth, UIElement container)
   at Telerik.UI.Xaml.Controls.Grid.DataGridColumn.MeasureCell(GridCellModel cell, Double availableWidth)
   at Telerik.UI.Xaml.Controls.Grid.RadDataGrid.MeasureHeaderCell(GridHeaderCellModel cell)
   at Telerik.U

 

William
Top achievements
Rank 1
Iron
commented on 09 Sep 2021, 05:46 PM

I'm running out of time to evaluate
Vladimir Stoyanov
Telerik team
commented on 10 Sep 2021, 12:12 PM

Hello William,

I posted a reply in the other thread that you opened: Defining columns in RadDataGrid causes exception on load. We can continue the discussion there in order to avoid duplicate replies. 

Thank in advance for your understanding.

Tags
Chart
Asked by
William
Top achievements
Rank 1
Iron
Answers by
Dilyan Traykov
Telerik team
Share this question
or