打开代码片段管理器。快捷键ctrl +k +b,菜单:工具->代码片段管理器
选择对应用编辑语言
15
2021
10
14
2021
10
Console.WriteLine不能输出信息调试bug
问题:
一直在应用程序中Console.WriteLine输出信息来调试bug。换到.net Core后,却发现怎么也无法输出
解决:
这个问题的原因是.net Core及高级版开始已经不再使用Hosting Process模式,在Hosting Process时可以将信息输出至 Output窗口。
14
2021
10
NetCore与NetFramework、Mono的主要差异
NetCore与NetFramework主要差异:
应用模型 -- .NET Core 不支持所有 .NET Framework 应用模型,某种程序上是因为其中许多模型都是基于 Windows 技术,如 WPF(基于 DirectX 生成,听说netcore3.0会支持)。 但 .NET Core 和 .NET Framework 两者都支持控制台和 http://ASP.NET Core 应用模型。
01
2021
10
30
2021
09
25
2021
09
24
2021
09
《我的记事本》编程过程(4)
下面的示例演示如何设置元素的 FontStyle 属性 TextBlock 。
<TextBlock Name="textBlock" Background="AntiqueWhite" Foreground="Navy" FontFamily="Century Gothic" //字体 FontSize="12" //字号 FontStretch="UltraExpanded" FontStyle="Italic" //倾斜 FontWeight="UltraBold" //粗体 TextDecorations=”Underline” //下划线 LineHeight="Auto" Padding="5,10,5,10" TextAlignment="Center" //居中 TextWrapping="Wrap" //自动换行 Typography.NumeralStyle="OldStyle" Typography.SlashedZero="True" > <Run Background="LightGreen">Text run 1.</Run> <LineBreak/><Run Background="LightBlue">Text run 2.</Run> <LineBreak/><Run Background="LightYellow">Text run 3.</Run> </TextBlock>
读取系统字体列表:参考
23
2021
09
《我的记事本》编程过程(3)
23
2021
09
《我的记事本》编程过程(2)
导入窗体图标文件:
Icon="pack://siteoforigin:,,,/Resources/file_document.tif"
菜单导入图标:
<MenuItem.Icon>
<Image Source="pack://siteoforigin:,,,/Resources/folder_open.tif" Height="20" />
</MenuItem.Icon>
菜单分隔:
<Separator />