首页 > 编程语言 >C#画刷转换

C#画刷转换

时间:2022-08-29 14:57:52浏览次数:52  
标签:转换 C# SolidColorBrush 255 Brush new 画刷 Bursh brush

HEX16色转Bursh:

Brush brush = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FFFFFF"));
1
RGB三原色转Bursh:

Brush brush = new SolidColorBrush(Color.FromRgb(255, 255, 255));
1
HEX16色转Bursh:

Brush brush = (Brush)new BrushConverter().ConvertFromString("#FFFFFF");
1
Color转Bursh:

Brush brush = new SolidColorBrush(Colors.White));
————————————————
版权声明:本文为CSDN博主「XBMY」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/cxb2011/article/details/105148834

标签:转换,C#,SolidColorBrush,255,Brush,new,画刷,Bursh,brush
From: https://www.cnblogs.com/fengxiaokang/p/16635937.html

相关文章

  • 【leetcode】81. 搜索旋转排序数组 II
    原题地址:https://leetcode.cn/problems/search-in-rotated-sorted-array-ii/用循环遍历数组肯定能轻松找到target但要尽可能减少操作步骤,一般跟顺序有关的都是用二分,关键......
  • 【Traefik二次开发】服务 Service 开发
    Service定义https://doc.traefik.io/traefik/routing/services/TheServicesareresponsibleforconfiguringhowtoreachtheactualservicesthatwilleventuall......
  • Centos 7 zabbix系统安装,超详细!
    1第一步打开官网下载地址,选择合适的版本,这边我用的是3A的服务器centos7.9,zabbix版本是5.0https://www.zabbix.com/cn/download2.安装配置zabbixa.InstallZabbixrepo......
  • 坐标转换:4326转3857
    functionWGS84ToMercator(lonlat){constcoord={lat:0,lng:0};constearthRad=6378137.0;//地球半径coord.lat=lonlat.ln......
  • scan chain masking in the compactor
    1.X-blocking 使用EDTcompactor压缩scanchain会导致X-blocking,compactor会将scanchain的observe值做异或运算,两条chain中的任意一条为X,edtchanneloutput都会......
  • 字节跳动基于 ClickHouse 优化实践之“查询优化器”
    更多技术交流、求职机会,欢迎关注字节跳动数据平台微信公众号,回复【1】进入官方交流群 相信大家都对大名鼎鼎的ClickHouse有一定的了解了,它强大的数据分析性能让人印......
  • 【ubuntu18.04 Server】解决Failed to restart network.service: Unit network.servic
    1、问题配置静态IP时,报错Failedtorestartnetwork.service:Unitnetwork.servicenotfound.  2、解决办法sudoapt-getinstallnetwork-manager  参考......
  • tomcat实现链路追踪-skywalking
    下载软件包wgethttps://archive.apache.org/dist/tomcat/tomcat-8/v8.5.82/bin/apache-tomcat-8.5.82.tar.gzwgethttps://download.oracle.com/java/18/latest/jdk-18_......
  • 03.活动Activity
    1、活动是什么?活动(Activity)是最容易吸引到用户的地方了,它是一种可以包含用户界面的组件(Android四大组件之一),主要用于和用户进行交互。一个应用程序中可以包含零个或多个活......
  • Elasticsearch实时搜索引擎
    一、实时搜索引擎ElasticsearchElasticsearch是一个基于ApacheLucene(TM)的开源搜索引擎,无论在开源还是专有领域,Lucene可以被认为是迄今为止最先进、性能最好的、功能最......