-
Sep 20th, 2021, 10:15 AM
#1
Thread Starter
Addicted Member
[RESOLVED] helix toolkit on .net core reference iusse
I'm trying to port a .net framework app to .net core (3.1), so I get the packages from nuget helixtoolkit, helixtoolkit.core.wpf and helixtoolkit.core.sharpdx. But the regefence in xaml, that I copied here: http://docs.helix-toolkit.org/en/lat...t-to-your-xaml is not correct. errors desappear if I reference xmlns:HelixToolkit="http://helix-toolkit.org/wpf", but app not show anything and crash. What am I missing?
here the xaml:
Code:
<UserControl x:Class="UCGraph3D"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Graph2k_Motors_Core"
xmlns:HelixToolkit="http://helix-toolkit.org/wpf"
mc:Ignorable="d"
d:DesignHeight="685" d:DesignWidth="1277" Background="#ff323130">
<Grid>
<HelixToolkit:HelixViewport3D Name="myviewport" ZoomExtentsWhenLoaded="True" Background="Black" ShowCoordinateSystem="True" >
<!-- Remember to add light to the scene -->
<HelixToolkit:SunLight/>
<ModelVisual3D>
<ModelVisual3D.Content>
<GeometryModel3D x:Name="myGeometryModel3D">
<GeometryModel3D.Geometry>
<MeshGeometry3D x:Name="myMeshGeometry3D"
TextureCoordinates="0.5 0.8 2 3 ">
</MeshGeometry3D>
</GeometryModel3D.Geometry >
<GeometryModel3D.Material>
<MaterialGroup>
<DiffuseMaterial>
<DiffuseMaterial.Brush>
<LinearGradientBrush StartPoint="0,0.5" EndPoint="2,2">
<LinearGradientBrush.GradientStops>
<GradientStop Color="green" Offset="0.1" />
<GradientStop Color="yellow" Offset="0.5" />
<GradientStop Color="red" Offset="1" />
<GradientStop Color="Blue" Offset="2" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</DiffuseMaterial.Brush>
</DiffuseMaterial>
</MaterialGroup>
</GeometryModel3D.Material>
</GeometryModel3D>
</ModelVisual3D.Content>
</ModelVisual3D>
<HelixToolkit:GridLinesVisual3D x:Name="mygridX" Width="10" Length="10" MinorDistance="1" MajorDistance="1" Thickness="0.01" Fill="#FF03F921" LengthDirection="1,0,0" Normal="0,0,1"/>
<HelixToolkit:GridLinesVisual3D x:Name="mygridY" Width="10" Length="10" MinorDistance="1" MajorDistance="1" Thickness="0.01" Fill="#FF03F921" LengthDirection="0,0,1" Normal="1,0,0"/>
<HelixToolkit:GridLinesVisual3D x:Name="mygridZ" Width="10" Length="10" MinorDistance="1" MajorDistance="1" Thickness="0.01" Fill="#FF03F921" LengthDirection="1,0,0" Normal="0,1,0" />
<HelixToolkit:BillboardTextVisual3D Position="11 0 0" Text="X" Foreground="Yellow"/>
<HelixToolkit:BillboardTextVisual3D Position="0 11 0" Text="Y" Foreground="Yellow" />
<HelixToolkit:BillboardTextVisual3D Position="0 0 11" Text="Z" Foreground="Yellow"/>
</HelixToolkit:HelixViewport3D>
</Grid>
</UserControl>
-
Oct 7th, 2021, 04:27 AM
#2
Thread Starter
Addicted Member
Re: helix toolkit on .net core reference iusse
I solved! It was a VGA driver problem(I was running in a VMWare VM taht use vmware graphics driver, changing drivers, or running outside the VM it work fine.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|