当前位置: 首页 > news >正文

西安是哪个省哪个市自动seo系统

西安是哪个省哪个市,自动seo系统,建设协会网站的公司,网站做二级域名干什么用文章目录 前言实现效果微软平台的历史问题 WPF 项目搭建Nuget添加额外框架添加项目初始化livecharts配置其它LiveCharts2 案例简单案例Demo示例ViewViewModel GPU渲染 Github地址仓库 前言 LiveChart 是C# 上面很受欢迎的统计图 UI控件。最近在学WPFhalcon开发,想想…

文章目录

  • 前言
    • 实现效果
    • 微软平台的历史问题
  • WPF 项目搭建
    • Nuget添加
    • 额外框架添加
    • 项目初始化
    • livecharts配置
    • 其它LiveCharts2 案例
    • 简单案例Demo示例
      • View
      • ViewModel
    • GPU渲染
  • Github地址仓库

前言

LiveChart 是C# 上面很受欢迎的统计图 UI控件。最近在学WPF+halcon开发,想想还是把LiveCharts 也顺便学一下

LiveCharts2 官网

LiveCharts2 WPF 平台官方文档

Gitee仓库地址 gclove2000 / WPF_LiveCharts2

在这里插入图片描述

实现效果

在这里插入图片描述

微软平台的历史问题

微软推出这么多UI框架干嘛。我希望MAUI在5年内不变。先把跨平台的问题解决好。
在这里插入图片描述

WPF 项目搭建

Nuget添加

注意:Livecharts2 目前是预览版,所以需要在搜索的时候添加预览版选项
在这里插入图片描述

LiveChartsCore.SkiaSharpView.WPF

在这里插入图片描述

额外框架添加

在这里插入图片描述

WPF Prims框架详解

WPF CommunityToolkit.Mvvm

项目初始化

按照案例运行完美成功!

ViewModel属性添加

using LiveChartsCore;
using LiveChartsCore.SkiaSharpView;namespace WpfSample
{public class ViewModel{public ISeries[] Series { get; set; } = new ISeries[]{new LineSeries<double>{Values = new double[] { 2, 1, 3, 5, 3, 4, 6 },Fill = null}};}
}

xml添加

<Window x:Class="MyApp"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WPFSample"xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF"><Window.DataContext><local:ViewModel /></Window.DataContext><lvc:CartesianChartSeries="{Binding Series}"></lvc:CartesianChart></Window>

在这里插入图片描述
运行效果
在这里插入图片描述

livecharts配置

看不懂,暂时不用
在这里插入图片描述

其它LiveCharts2 案例

我们可以在LiveCharts2的Example里面选择案例
常用的:条形图,柱状图,雷达塔,世界地图等都有,而且都有对应的动态动画
在这里插入图片描述
在这里插入图片描述

简单案例Demo示例

在这里插入图片描述

View

<UserControl x:Class="BlankApp1.Views.AView"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:BlankApp1.Views"xmlns:ViewModel="clr-namespace:BlankApp1.ViewModels"xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF"mc:Ignorable="d"d:DesignHeight="450"d:DesignWidth="800"><UserControl.DataContext><ViewModel:AViewModel /></UserControl.DataContext><Grid><Grid.RowDefinitions><RowDefinition /><RowDefinition /></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition /><ColumnDefinition /></Grid.ColumnDefinitions><lvc:CartesianChart Series="{Binding Series}"Grid.Row="0"Grid.Column="0" /><lvc:CartesianChart Series="{Binding Series2}"Grid.Row="0"Grid.Column="1"YAxes="{Binding YAxes2}" /><lvc:PieChart Series="{Binding Series3}"Grid.Row="1"Grid.Column="0"Title="{Binding Title3}"></lvc:PieChart><lvc:PieChart Grid.Row="1"Grid.Column="1"Series="{Binding Series4}" /></Grid>
</UserControl>

ViewModel

using CommunityToolkit.Mvvm.ComponentModel;
using LiveChartsCore.SkiaSharpView;
using LiveChartsCore;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LiveChartsCore.SkiaSharpView.Painting;
using SkiaSharp;
using System.Windows.Ink;
using LiveChartsCore.SkiaSharpView.Extensions;
using LiveChartsCore.SkiaSharpView.VisualElements;namespace BlankApp1.ViewModels
{partial class AViewModel : ObservableObject{public AViewModel() {var outer = 0;var data = new[] { 6, 5, 4, 3, 2 };// you can convert any array, list or IEnumerable<T> to a pie series collection:Series4 = data.AsPieSeries((value, series) =>{// this method is called once per element in the array// we are decrementing the outer radius 50px// on every element in the array.series.InnerRadius = 50;series.OuterRadiusOffset = outer;outer += 50;});}[ObservableProperty]private string title = "ViewA";public ISeries[] Series { get; set; }= new ISeries[]{new LineSeries<double>{Values = new double[] { 2, 1, 3, 5, 3, 4, 6 },Fill = null}};public ISeries[] Series2 { get; set; } ={new ColumnSeries<double>{IsHoverable = false, // disables the series from the tooltips Values = new double[] { 10, 10, 10, 10, 10, 10, 10 },Stroke = null,Fill = new SolidColorPaint(new SKColor(30, 30, 30, 30)),IgnoresBarPosition = true},new ColumnSeries<double>{Values = new double[] { 3, 10, 5, 3, 7, 3, 8 },Stroke = null,Fill = new SolidColorPaint(SKColors.CornflowerBlue),IgnoresBarPosition = true}};public Axis[] YAxes2 { get; set; } ={new Axis { MinLimit = 0, MaxLimit = 10 }};public IEnumerable<ISeries> Series3 { get; set; } =new[] { 2, 4, 1, 4, 3 }.AsPieSeries();public LabelVisual Title3 { get; set; } =new LabelVisual{Text = "My chart title",TextSize = 25,Padding = new LiveChartsCore.Drawing.Padding(15),Paint = new SolidColorPaint(SKColors.DarkSlateGray)};public IEnumerable<ISeries> Series4 { get; set; }}
}

GPU渲染

我听说LiveCharts2是用GPU渲染的,发现好像是真的
在这里插入图片描述

Github地址仓库

Gitee仓库地址 gclove2000 / WPF_LiveCharts2

http://www.hkea.cn/news/420838/

相关文章:

  • 建设网站的需求分析俄罗斯搜索引擎yandex推广入口
  • 可以做英文纵横字谜的网站搜狗网站收录入口
  • web前端开发是不是做网站百家号关键词排名优化
  • 夸克看网站要钱吗电商网站seo优化
  • 自己做网站排版138ip查询网域名解析
  • 东莞做网站 南城石佳2023网站推广入口
  • 广东省省建设厅网站郴州网站建设网络推广平台
  • 校园网站推广方案怎么做应用商店优化
  • 巩义网站建设网络营销公司是做什么的
  • 做网站基本教程一站式营销平台
  • 杭州模板网站建设电脑培训网上培训班
  • 大连做网站不错的公司怎样把广告放到百度
  • 网站上面带官网字样怎么做的网站设计的流程
  • 有个网站是做视频相册的网球排名即时最新排名
  • 论坛网站备案流程图优化大师怎么提交作业
  • 织梦政府网站模板百度在线入口
  • 专业做婚纱摄影网站会员制营销
  • 网站内容丰富互动营销平台
  • 阿里巴巴logo高清图谷歌seo网站推广
  • 网站如何做内链seo高手是怎样炼成的
  • 设计师个人网站建设怎样注册一个自己的平台
  • 徐州营销网站建设产品线上推广渠道
  • 绍兴市网站建设公司企业官网搭建
  • 关于网页设计的网站免费发布信息网站大全
  • 郑州新闻头条seo基础教程
  • 做网站比较大的公司朔州seo
  • 如何制作私人网站福州专业的seo软件
  • 做网站主流技术南宁在哪里推广网站
  • 老板让我做网站负责人微博营销软件
  • 教我做网站百度打开