WPF编程--helix-toolkit 官方SimpleDemo

这篇具有很好参考价值的文章主要介绍了WPF编程--helix-toolkit 官方SimpleDemo。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

helix toolkit,HelixToolkit,3D控件,WPF,.net,microsoft,wpf

视频:  WPF helix-toolkit 官方SimpleDemo_哔哩哔哩_bilibili

源码: https://github.com/liugang198409/WpfDemo/tree/master/3DSimpleDemo

1. 环境

Visual Studio 2019 + .NET Framework 4.8.1

2. NuGet导入依赖

HelixToolkit

HelixToolkit.wpf

3. 创建类MainViewModel.cs

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="MainViewModel.cs" company="Helix Toolkit">
//   Copyright (c) 2014 Helix Toolkit contributors
// </copyright>
// <summary>
//   Provides a ViewModel for the Main window.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace _3DSimpleDemo
{
    using System.Windows.Media;
    using System.Windows.Media.Media3D;

    using HelixToolkit.Wpf;

    /// <summary>
    /// Provides a ViewModel for the Main window.
    /// </summary>
    public class MainViewModel
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewModel"/> class.
        /// </summary>
        public MainViewModel()
        {
            // Create a model group
            var modelGroup = new Model3DGroup();

            // Create a mesh builder and add a box to it
            var meshBuilder = new MeshBuilder(false, false);
            meshBuilder.AddBox(new Point3D(0, 0, 1), 1, 2, 0.5);
            meshBuilder.AddBox(new Rect3D(0, 0, 1.2, 0.5, 1, 0.4));

            // Create a mesh from the builder (and freeze it)
            var mesh = meshBuilder.ToMesh(true);

            // Create some materials
            var greenMaterial = MaterialHelper.CreateMaterial(Colors.Green);
            var redMaterial = MaterialHelper.CreateMaterial(Colors.Red);
            var blueMaterial = MaterialHelper.CreateMaterial(Colors.Blue);
            var insideMaterial = MaterialHelper.CreateMaterial(Colors.Yellow);

            // Add 3 models to the group (using the same mesh, that's why we had to freeze it)
            modelGroup.Children.Add(new GeometryModel3D { Geometry = mesh, Material = greenMaterial, BackMaterial = insideMaterial });
            modelGroup.Children.Add(new GeometryModel3D { Geometry = mesh, Transform = new TranslateTransform3D(-2, 0, 0), Material = redMaterial, BackMaterial = insideMaterial });
            modelGroup.Children.Add(new GeometryModel3D { Geometry = mesh, Transform = new TranslateTransform3D(2, 0, 0), Material = blueMaterial, BackMaterial = insideMaterial });

            // Set the property, which will be bound to the Content property of the ModelVisual3D (see MainWindow.xaml)
            this.Model = modelGroup;
        }

        /// <summary>
        /// Gets or sets the model.
        /// </summary>
        /// <value>The model.</value>
        public Model3D Model { get; set; }
    }
}

 4. 编辑MainWindow.xaml

<Window x:Class="_3DSimpleDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:HelixToolkit="clr-namespace:HelixToolkit.Wpf;assembly=HelixToolkit.Wpf"
    xmlns:local="clr-namespace:_3DSimpleDemo"
    Title="SimpleDemo"
    Width="640"
    Height="480">
    <Window.DataContext>
        <local:MainViewModel />
    </Window.DataContext>
    <Grid>
        <Grid.Resources>
            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
            <HelixToolkit:NotNullToVisibilityConverter x:Key="NotNullToVisibilityConverter" />
            <Style TargetType="{x:Type HelixToolkit:HelixViewport3D}">
                <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type HelixToolkit:HelixViewport3D}">
                            <Border
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}">
                                <Grid FocusVisualStyle="{x:Null}">
                                    <HelixToolkit:CameraController
                                        x:Name="PART_CameraController"
                                        CameraMode="{TemplateBinding CameraMode}"
                                        CameraRotationMode="{TemplateBinding CameraRotationMode}"
                                        ChangeFieldOfViewCursor="{TemplateBinding ChangeFieldOfViewCursor}"
                                        DefaultCamera="{TemplateBinding DefaultCamera}"
                                        InertiaFactor="{TemplateBinding CameraInertiaFactor}"
                                        InfiniteSpin="{TemplateBinding InfiniteSpin}"
                                        IsChangeFieldOfViewEnabled="{TemplateBinding IsChangeFieldOfViewEnabled}"
                                        IsInertiaEnabled="{TemplateBinding IsInertiaEnabled}"
                                        IsMoveEnabled="{TemplateBinding IsMoveEnabled}"
                                        IsPanEnabled="{TemplateBinding IsPanEnabled}"
                                        IsRotationEnabled="{TemplateBinding IsRotationEnabled}"
                                        IsTouchZoomEnabled="{TemplateBinding IsTouchZoomEnabled}"
                                        IsZoomEnabled="{TemplateBinding IsZoomEnabled}"
                                        LeftRightPanSensitivity="{TemplateBinding LeftRightPanSensitivity}"
                                        LeftRightRotationSensitivity="{TemplateBinding LeftRightRotationSensitivity}"
                                        MaximumFieldOfView="{TemplateBinding MaximumFieldOfView}"
                                        MinimumFieldOfView="{TemplateBinding MinimumFieldOfView}"
                                        ModelUpDirection="{TemplateBinding ModelUpDirection}"
                                        PageUpDownZoomSensitivity="{TemplateBinding PageUpDownZoomSensitivity}"
                                        PanCursor="{TemplateBinding PanCursor}"
                                        RotateAroundMouseDownPoint="{TemplateBinding RotateAroundMouseDownPoint}"
                                        RotateCursor="{TemplateBinding RotateCursor}"
                                        RotationSensitivity="{TemplateBinding RotationSensitivity}"
                                        ShowCameraTarget="{TemplateBinding ShowCameraTarget}"
                                        UpDownPanSensitivity="{TemplateBinding UpDownPanSensitivity}"
                                        UpDownRotationSensitivity="{TemplateBinding UpDownRotationSensitivity}"
                                        ZoomAroundMouseDownPoint="{TemplateBinding ZoomAroundMouseDownPoint}"
                                        ZoomCursor="{TemplateBinding ZoomCursor}"
                                        ZoomRectangleCursor="{TemplateBinding ZoomRectangleCursor}"
                                        ZoomSensitivity="{TemplateBinding ZoomSensitivity}">
                                        <HelixToolkit:CameraController.InputBindings>
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.ResetCameraCommand}" Gezture="{Binding ResetCameraKeyGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.RotateCommand}" Gezture="{Binding RotateGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.RotateCommand}" Gezture="{Binding RotateGesture2, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.PanCommand}" Gezture="{Binding PanGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.PanCommand}" Gezture="{Binding PanGesture2, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.ZoomCommand}" Gezture="{Binding ZoomGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.ZoomCommand}" Gezture="{Binding ZoomGesture2, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.ZoomRectangleCommand}" Gezture="{Binding ZoomRectangleGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.ChangeFieldOfViewCommand}" Gezture="{Binding ChangeFieldOfViewGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.ChangeLookAtCommand}" Gezture="{Binding ChangeLookAtGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.ZoomExtentsCommand}" Gezture="{Binding ZoomExtentsGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.ResetCameraCommand}" Gezture="{Binding ResetCameraGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.TopViewCommand}" Gezture="{Binding TopViewGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.BottomViewCommand}" Gezture="{Binding BottomViewGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.LeftViewCommand}" Gezture="{Binding LeftViewGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.RightViewCommand}" Gezture="{Binding RightViewGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.FrontViewCommand}" Gezture="{Binding FrontViewGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:CameraController.BackViewCommand}" Gezture="{Binding BackViewGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <HelixToolkit:InputBindingX Command="{x:Static HelixToolkit:HelixViewport3D.OrthographicToggleCommand}" Gezture="{Binding OrthographicToggleGesture, RelativeSource={RelativeSource TemplatedParent}}" />
                                        </HelixToolkit:CameraController.InputBindings>
                                        <Grid x:Name="PART_ViewportGrid">
                                            <AdornerDecorator
                                                x:Name="PART_AdornerLayer"
                                                HorizontalAlignment="Stretch"
                                                VerticalAlignment="Stretch"
                                                DataContext="{TemplateBinding DataContext}"
                                                IsHitTestVisible="False" />
                                            <!--  the main viewport3D is inserted here  -->
                                        </Grid>
                                    </HelixToolkit:CameraController>

                                    <!--  Coordinate system  -->
                                    <Viewport3D
                                        x:Name="PART_CoordinateView"
                                        Width="{TemplateBinding CoordinateSystemWidth}"
                                        Height="{TemplateBinding CoordinateSystemHeight}"
                                        Margin="0"
                                        HorizontalAlignment="{TemplateBinding CoordinateSystemHorizontalPosition}"
                                        VerticalAlignment="{TemplateBinding CoordinateSystemVerticalPosition}"
                                        ClipToBounds="False"
                                        IsHitTestVisible="False"
                                        Visibility="{TemplateBinding ShowCoordinateSystem,
                                                                     Converter={StaticResource BooleanToVisibilityConverter}}">
                                        <HelixToolkit:ArrowVisual3D Fill="#964B4B" Point2="8 0 0" />
                                        <HelixToolkit:ArrowVisual3D Fill="#4B964B" Point2="0 8 0" />
                                        <HelixToolkit:ArrowVisual3D Fill="#4B4B96" Point2="0 0 8" />

                                        <HelixToolkit:BillboardTextVisual3D
                                            Foreground="{Binding CoordinateSystemLabelForeground, RelativeSource={RelativeSource TemplatedParent}}"
                                            Position="10 0 0"
                                            Text="{Binding CoordinateSystemLabelX, RelativeSource={RelativeSource TemplatedParent}}" />
                                        <HelixToolkit:BillboardTextVisual3D
                                            Foreground="{Binding CoordinateSystemLabelForeground, RelativeSource={RelativeSource TemplatedParent}}"
                                            Position="0 10 0"
                                            Text="{Binding CoordinateSystemLabelY, RelativeSource={RelativeSource TemplatedParent}}" />
                                        <HelixToolkit:BillboardTextVisual3D
                                            Foreground="{Binding CoordinateSystemLabelForeground, RelativeSource={RelativeSource TemplatedParent}}"
                                            Position="0 0 10"
                                            Text="{Binding CoordinateSystemLabelZ, RelativeSource={RelativeSource TemplatedParent}}" />

                                        <!--<local:PieSliceVisual3D Normal="1,0,0" UpVector="0,0,1" InnerRadius="3" OuterRadius="6"  Fill="#80ff0000"/>
                                <local:PieSliceVisual3D Normal="0,1,0" UpVector="1,0,0" InnerRadius="3" OuterRadius="6"  Fill="#8000ff00"/>
                                <local:PieSliceVisual3D Normal="0,0,1" UpVector="0,1,0" InnerRadius="3" OuterRadius="6"  Fill="#800000ff"/>-->
                                    </Viewport3D>


                                    <Grid IsHitTestVisible="False">
                                        <!--  Titles  -->
                                        <StackPanel
                                            Margin="5"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Top"
                                            Background="{TemplateBinding TitleBackground}">
                                            <TextBlock
                                                FontFamily="{TemplateBinding TitleFontFamily}"
                                                FontSize="{TemplateBinding TitleSize}"
                                                FontWeight="Bold"
                                                Foreground="{TemplateBinding TextBrush}"
                                                Text="{TemplateBinding Title}"
                                                Visibility="{TemplateBinding Title,
                                                                             Converter={StaticResource NotNullToVisibilityConverter}}" />
                                            <TextBlock
                                                FontFamily="{TemplateBinding TitleFontFamily}"
                                                FontSize="{TemplateBinding SubTitleSize}"
                                                Foreground="{TemplateBinding TextBrush}"
                                                Text="{TemplateBinding SubTitle}"
                                                Visibility="{TemplateBinding SubTitle,
                                                                             Converter={StaticResource NotNullToVisibilityConverter}}" />
                                        </StackPanel>

                                        <StackPanel
                                            Margin="6"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Bottom"
                                            Background="{TemplateBinding InfoBackground}">
                                            <TextBlock
                                                Padding="4"
                                                HorizontalAlignment="Left"
                                                Foreground="{TemplateBinding InfoForeground}"
                                                Text="{TemplateBinding FrameRateText}"
                                                Visibility="{TemplateBinding ShowFrameRate,
                                                                             Converter={StaticResource BooleanToVisibilityConverter}}" />
                                            <TextBlock
                                                Padding="4"
                                                HorizontalAlignment="Right"
                                                Foreground="{TemplateBinding InfoForeground}"
                                                Text="{TemplateBinding FieldOfViewText}"
                                                Visibility="{TemplateBinding ShowFieldOfView,
                                                                             Converter={StaticResource BooleanToVisibilityConverter}}" />
                                            <TextBlock
                                                HorizontalAlignment="Right"
                                                Foreground="{TemplateBinding InfoForeground}"
                                                Text="{TemplateBinding Status}"
                                                Visibility="{TemplateBinding Status,
                                                                             Converter={StaticResource NotNullToVisibilityConverter}}" />
                                        </StackPanel>

                                        <StackPanel
                                            Margin="6"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Bottom"
                                            Background="{TemplateBinding InfoBackground}">
                                            <TextBlock
                                                Padding="4"
                                                Foreground="{TemplateBinding InfoForeground}"
                                                Text="{TemplateBinding CameraInfo}"
                                                Visibility="{TemplateBinding ShowCameraInfo,
                                                                             Converter={StaticResource BooleanToVisibilityConverter}}" />
                                            <TextBlock
                                                Padding="4"
                                                Foreground="{TemplateBinding InfoForeground}"
                                                Text="{TemplateBinding TriangleCountInfo}"
                                                Visibility="{TemplateBinding ShowTriangleCountInfo,
                                                                             Converter={StaticResource BooleanToVisibilityConverter}}" />
                                            <TextBlock
                                                Foreground="{TemplateBinding InfoForeground}"
                                                Text="{TemplateBinding DebugInfo}"
                                                Visibility="{TemplateBinding DebugInfo,
                                                                             Converter={StaticResource NotNullToVisibilityConverter}}" />
                                        </StackPanel>
                                    </Grid>

                                    <Viewport3D
                                        x:Name="PART_ViewCubeViewport"
                                        Width="{TemplateBinding ViewCubeWidth}"
                                        Height="{TemplateBinding ViewCubeHeight}"
                                        Margin="0"
                                        HorizontalAlignment="{TemplateBinding ViewCubeHorizontalPosition}"
                                        VerticalAlignment="{TemplateBinding ViewCubeVerticalPosition}"
                                        Opacity="0.5"
                                        Visibility="{TemplateBinding ShowViewCube,
                                                                     Converter={StaticResource BooleanToVisibilityConverter}}">
                                        <HelixToolkit:ViewCubeVisual3D
                                            x:Name="PART_ViewCube"
                                            BackText="{Binding ViewCubeBackText, RelativeSource={RelativeSource TemplatedParent}}"
                                            BottomText="{Binding ViewCubeBottomText, RelativeSource={RelativeSource TemplatedParent}}"
                                            EnableEdgeClicks="{Binding IsViewCubeEdgeClicksEnabled, RelativeSource={RelativeSource TemplatedParent}}"
                                            FrontText="{Binding ViewCubeFrontText, RelativeSource={RelativeSource TemplatedParent}}"
                                            IsEnabled="{Binding IsRotationEnabled, RelativeSource={RelativeSource TemplatedParent}}"
                                            IsTopBottomViewOrientedToFrontBack="{Binding IsTopBottomViewOrientedToFrontBack, RelativeSource={RelativeSource TemplatedParent}}"
                                            LeftText="{Binding ViewCubeLeftText, RelativeSource={RelativeSource TemplatedParent}}"
                                            ModelUpDirection="{Binding ModelUpDirection, RelativeSource={RelativeSource TemplatedParent}}"
                                            RightText="{Binding ViewCubeRightText, RelativeSource={RelativeSource TemplatedParent}}"
                                            TopText="{Binding ViewCubeTopText, RelativeSource={RelativeSource TemplatedParent}}" />
                                    </Viewport3D>
                                </Grid>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>
        <!--  The HelixViewport3D supports camera manipulation, and can be used just like the Viewport3D  -->
        <HelixToolkit:HelixViewport3D ShowFrameRate="True" ZoomExtentsWhenLoaded="True" ZoomAroundMouseDownPoint="True" RotateAroundMouseDownPoint="True" IsTopBottomViewOrientedToFrontBack="True" IsViewCubeEdgeClicksEnabled="True">


            <!--  Remember to add light to the scene  -->
            <HelixToolkit:SunLight />

            <!--  The content of this visual is defined in MainViewModel.cs  -->
            <ModelVisual3D Content="{Binding Model}" />

            <!--  You can also add elements here in the xaml  -->
            <HelixToolkit:GridLinesVisual3D
                Width="8"
                Length="8"
                MajorDistance="1"
                MinorDistance="1"
                Thickness="0.01" />

        </HelixToolkit:HelixViewport3D>
    </Grid>
</Window>

 文章来源地址https://www.toymoban.com/news/detail-677534.html

到了这里,关于WPF编程--helix-toolkit 官方SimpleDemo的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 使用MVVM Toolkit简化WPF开发

    最近. NET 8 的 WPF 推出了 WPF File Dialog改进,这样无需再引用 Win32 命名空间就可以实现文件夹的选择与存储了,算是一个很方便的改进了。顺手写了一个小的 WPF 程序,在使用 Model-View-ViewModel(MVVM) 模式的时候,我不想使用 Prism 等重量级的框架,找了一个轻量级的 MVVM Community T

    2024年02月05日
    浏览(61)
  • WPF之Microsoft.Toolkit.Mvvm(一)

    WPF编程中使用MVVM框架开发步骤。 第一步: 安装package从nuget: Microsoft.Toolkit.MVVM 和Microsoft.Xaml.Behaviors.Wpf和PropertyChanged.Fody 入下图所示: 第二步:引用命名空间、新建View文件夹、ViewModel文件夹 在Model和ViewModel中引入命名空间如下图所示:                         

    2024年02月04日
    浏览(51)
  • WPF使用Microsoft.Toolkit.Mvvm框架记录

    前言 为了解决WPF UI与程序逻辑之间得到解耦,所以使用Microsoft.Toolkit.Mvvm框架来实现,说真的开发逻辑真的有些不适应,不过理解就好。框架大体支持ICommand、IMessenger等。 MVVM是Model-View-ViewModel的简写。它本质上就是MVC (Model-View- Controller)的改进版。即模型-视图-视图模型。分

    2024年02月13日
    浏览(47)
  • Unity VR:XR Interaction Toolkit 官方 Demo

    Unity XR Interaction Toolkit 提供了一个官方 Demo,包含了丰富的功能演示,可以供大家更好地学习 VR 开发。 项目地址:https://github.com/Unity-Technologies/XR-Interaction-Toolkit-Examples)(不要选择 CSDN 的 Github 加速打开) 项目里包括多个演示场景,而 XRI_Examples_Main 是多个演示功能的整合,包

    2024年02月06日
    浏览(44)
  • 探秘Xceed WPF Toolkit:一个强大且灵活的UI开发利器

    项目地址:https://gitcode.com/xceedsoftware/wpftoolkit 如果你在寻找一款能够帮助你在Windows Presentation Foundation (WPF) 平台上快速构建美观、功能丰富的用户界面的工具包,那么Xceed WPF Toolkit绝对值得你关注。这款开源项目提供了大量预构建的控件和组件,旨在简化你的开发流程,提升应

    2024年03月27日
    浏览(40)
  • Wpf在.Net 6 下该用哪个Mvvm框架-Microsoft.Toolkit.Mvvm

    前言 在Wpf下最常使用的就是Mvvm模式了,有自己造轮子构建Mvvm框架的,也有使用现成的开源项目,我之前一直使用的是轻量级的MvvmLight了,这个框架还是非常不错的,使用也简单,不占用太大空间,其中最喜欢的莫过于全局Messenger了,可谓是神器。最近有个项目使用.Net6开发

    2024年02月06日
    浏览(50)
  • 手把手教你安装苹果官方转译工具Game Porting Toolkit ,用Mac轻松玩转windows以及3A大作

    1、安装sonoma系统 1.1 打开磁盘分区进行系统分区 1.2 点击显示所有设备,并创建sonoma分盘 1.3 下载sonoma安装包并进行下载 1.4 选择sonoma分盘安装sonoma安装包 1.5 最直接方法(升级到最新系统–推荐) 2、工具安装 2.1 安装xcode 15 2.2 安装Game porting toolkit beta 3、环境配置 3.1 打开终端

    2024年02月08日
    浏览(48)
  • WPF MvvM框架(MvvMLight,Microsoft Toolkit Mvvm,CommunityToolkit.Mvvm;鼠标,键盘,手写等事件绑定如:抬起按下事件)

    目录 1.MvvMLight(已废弃) 2. Microsoft Toolkit Mvvm(已废弃)  3.CommunityToolkit.Mvvm框架 4.Mvvm中的事件绑定 4.1 DataGrid表中按钮点击事件 4.2 绑定 鼠标事件,键盘事件,手写笔事件,多点触控事件 5.和PLC设备建立联系(联调)    本文中,继承接口,同步数据方法,command用法均一致; 1.继

    2024年02月04日
    浏览(60)
  • HelixToolkit使用教程

    HelixToolkit使用总结: 问题点:         3d光源         相机         网格信息 1、配置HelixViewPort3d基本参数 2、配置相机参数和相机位置:HelixViewPort3D.DefaultCamera         设置相机的放置方向和观看位置 3、配置光线:hv:SunLight 4、配置坐标网格 hv:GridLinesVisual3D 5、配置模型的属

    2024年02月10日
    浏览(65)
  • C# WPF编程-布局

    WPF窗口只能包含单个元素。为在WPF窗口中放置多个元素并创建更贴近实用的用户界面,需要在窗口上放置一个容器,然后在这个容器中添加其他元素。 造成这一限制的原因是Window类继承自ContentControl类。 在WPF窗口布局需要遵循以下几条重要原则: 不应显示设定元素的尺寸 :

    2024年03月25日
    浏览(38)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包