上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 33 下一页
摘要: 1、字体文件加入到项目资源下载字体文件(.ttf),添加到项目中,并设置生成操作为"Resource"。(很重要!!) 2、定义样式使用TextBlock作为图标显示的容器,因此定义一个TextBlock的样式即可,如下所示。其中“SK2015” 为字体名称。 <Style x:Key="FIcon 阅读全文
posted @ 2021-09-30 17:04 不溯流光 阅读(1221) 评论(0) 推荐(0)
摘要: 测试过程中,随着测试过程的进行,上位机会自动地切换TabControl页面。但用户手动切换到某一页面时,不想让页面继续跟随测试进程切换。 通过PreviewMouseLeftButtonUp事件是否触发来判断切换是用户触发的还是软件运行到的。 private void tabControl1_Pre 阅读全文
posted @ 2021-09-30 16:51 不溯流光 阅读(346) 评论(0) 推荐(0)
摘要: 这个功能可以用来实现Grid的分层效果。即在Grid里嵌套多个Border。 四个数分别对应左、上、右、下。 <!--显示左侧的线--> <Border Grid.Row="0" Grid.ColumnSpan="3" BorderBrush="LightBlue" BorderThickness= 阅读全文
posted @ 2021-09-30 16:43 不溯流光 阅读(1039) 评论(0) 推荐(0)
摘要: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys 阅读全文
posted @ 2021-09-30 16:32 不溯流光 阅读(670) 评论(0) 推荐(0)
摘要: 一、静态绑定 <Image Source="/Demo;Component/Images/Test.jpg"/> 2、动态绑定 <Grid Grid.Row="1"> <Image Source="{Binding Path=LTEModel.ImgSource,Converter={StaticR 阅读全文
posted @ 2021-09-30 16:26 不溯流光 阅读(1173) 评论(0) 推荐(0)
摘要: <ListBox Name="lstFileManager" Background ="Transparent" ItemsSource="{Binding}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.Ve 阅读全文
posted @ 2021-09-30 16:22 不溯流光 阅读(1284) 评论(0) 推荐(0)
摘要: MSDN: 获取或设置一个值,该值指示事件处理程序是否已完整处理事件。 将handled设置为false,说明未处理事件,则会将它发送到操作系统进行默认处理。将handled设置为true,说明事件已处理过,系统不处理了,相当于取消这个触发事件。 阅读全文
posted @ 2021-09-30 10:44 不溯流光 阅读(411) 评论(0) 推荐(0)
摘要: 一、排序 char[] tmp = str.ToArray();Array.Sort(tmp); //按ASCII排序 二、字节数组转换为ASCII字符串 // 字节数组 byte[] ba = new byte[] { 119,104,97,116,50,49,46,99,111,109 }; / 阅读全文
posted @ 2021-09-27 16:46 不溯流光 阅读(172) 评论(0) 推荐(0)
摘要: 一、用法 1、排序 //字典按键值升序排序dic = dic.OrderBy(p => p.Key).ToDictionary(p => p.Key, o => o.Value); //字典按键值降序排序 dic = dic.OrderByDescending(p => p.Key).ToDicti 阅读全文
posted @ 2021-09-27 16:44 不溯流光 阅读(673) 评论(0) 推荐(0)
摘要: 一、ArrayList转换为数组 (1)方法1 ArrayList List = new ArrayList(); Int32[] values = (Int32[])List.ToArray(typeof(Int32)); (2)方法2 ArrayList List = new ArrayList 阅读全文
posted @ 2021-09-27 16:36 不溯流光 阅读(84) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 33 下一页