08 2024 档案

摘要:<Window x:Class="WpfApp313.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2 阅读全文
posted @ 2024-08-30 17:41 FredGrit 阅读(5) 评论(0) 推荐(0) 编辑
摘要://customize control //xaml <UserControl x:Class="WpfApp309.RectTbk" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http:// 阅读全文
posted @ 2024-08-30 16:52 FredGrit 阅读(4) 评论(0) 推荐(0) 编辑
摘要://xaml <Window x:Class="WpfApp309.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/ 阅读全文
posted @ 2024-08-30 16:10 FredGrit 阅读(3) 评论(0) 推荐(0) 编辑
摘要://custom control //xaml <UserControl x:Class="WpfApp307.ElpTbk" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://sche 阅读全文
posted @ 2024-08-30 15:22 FredGrit 阅读(5) 评论(0) 推荐(0) 编辑
摘要://customzie control //xaml <UserControl x:Class="WpfApp306.ElpTbk" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://s 阅读全文
posted @ 2024-08-30 15:02 FredGrit 阅读(38) 评论(0) 推荐(0) 编辑
摘要://xaml <Window x:Class="WpfApp299.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/ 阅读全文
posted @ 2024-08-29 15:18 FredGrit 阅读(17) 评论(0) 推荐(0) 编辑
摘要://xaml <Window x:Class="WpfApp299.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/ 阅读全文
posted @ 2024-08-28 21:37 FredGrit 阅读(4) 评论(0) 推荐(0) 编辑
摘要://xaml <Window x:Class="WpfApp302.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/ 阅读全文
posted @ 2024-08-28 18:05 FredGrit 阅读(12) 评论(0) 推荐(0) 编辑
摘要://xaml <Window x:Class="WpfApp299.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/ 阅读全文
posted @ 2024-08-28 16:37 FredGrit 阅读(16) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System 阅读全文
posted @ 2024-08-28 15:44 FredGrit 阅读(7) 评论(0) 推荐(0) 编辑
摘要:Task.Run(() => { InitData(); }); The calling thread must be STA, because many UI components require this. The solution is make sure current method in 阅读全文
posted @ 2024-08-28 14:32 FredGrit 阅读(18) 评论(0) 推荐(0) 编辑
摘要:Copy from https://www.erikzhou.com/blogs/reflection_in_csharp/ Pros and Cons of Reflection Reflection is a powerful tool, but it comes with its own se 阅读全文
posted @ 2024-08-27 18:51 FredGrit 阅读(8) 评论(0) 推荐(0) 编辑
摘要:using System.Diagnostics; using System.IO; using System.Reflection; using System.Text; namespace ConsoleApp58 { internal class Program { static List<B 阅读全文
posted @ 2024-08-27 18:38 FredGrit 阅读(3) 评论(0) 推荐(0) 编辑
摘要:using System.Threading; namespace ConsoleApp57 { internal class Program { static void Main(string[] args) { PrintNumers(); Console.WriteLine("Hello, W 阅读全文
posted @ 2024-08-27 17:54 FredGrit 阅读(3) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System 阅读全文
posted @ 2024-08-27 17:25 FredGrit 阅读(6) 评论(0) 推荐(0) 编辑
摘要:1.Add Com Reference,Microsoft.Office.Interop.Excel 2. using Microsoft.Office.Interop.Excel; using System; using System.IO; using System.Runtime.Compil 阅读全文
posted @ 2024-08-27 16:27 FredGrit 阅读(9) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization.Formatters.Binary; using System 阅读全文
posted @ 2024-08-27 15:32 FredGrit 阅读(7) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System 阅读全文
posted @ 2024-08-27 11:55 FredGrit 阅读(11) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System 阅读全文
posted @ 2024-08-27 11:28 FredGrit 阅读(7) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System 阅读全文
posted @ 2024-08-25 21:01 FredGrit 阅读(9) 评论(0) 推荐(0) 编辑
摘要:private void InitImg() { Image img = new Image(); Binding imgSourceBinding = new Binding("ImgUrl"); imgSourceBinding.Mode = BindingMode.TwoWay; Bindin 阅读全文
posted @ 2024-08-25 20:52 FredGrit 阅读(2) 评论(0) 推荐(0) 编辑
摘要:private void ButtonCommandBinding() { Button btn = new Button(); btn.Width = 500; btn.Height = 300; btn.Content = "Show Info"; btn.Background = new So 阅读全文
posted @ 2024-08-25 18:29 FredGrit 阅读(8) 评论(0) 推荐(0) 编辑
摘要:Copy from https://www.c-sharpcorner.com/blogs/wpf-logical-and-visual-trees1 WPF's hierarchical structure requires a new conceptual model of applicatio 阅读全文
posted @ 2024-08-25 17:55 FredGrit 阅读(5) 评论(0) 推荐(0) 编辑
摘要:Freezable—The base class for objects that can be “frozen” into a read-only state for performance reasons. Freezables, once frozen, can be safely share 阅读全文
posted @ 2024-08-25 17:16 FredGrit 阅读(5) 评论(0) 推荐(0) 编辑
摘要://The xaml material named MainWin.xaml <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com 阅读全文
posted @ 2024-08-23 20:39 FredGrit 阅读(7) 评论(0) 推荐(0) 编辑
摘要:System.Windows.Markup.XamlParseException HResult=0x80131501 Message='Specified class name 'WpfApp268.MainWindow' doesn't match actual root instance ty 阅读全文
posted @ 2024-08-23 20:22 FredGrit 阅读(45) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading; using Syste 阅读全文
posted @ 2024-08-22 20:54 FredGrit 阅读(4) 评论(0) 推荐(0) 编辑
摘要://xaml <UserControl x:Class="WpfApp263.ELpTbk" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com 阅读全文
posted @ 2024-08-22 17:32 FredGrit 阅读(3) 评论(0) 推荐(0) 编辑
摘要:public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); var vm = new MainVM(this); this.DataContext = vm; } } public c 阅读全文
posted @ 2024-08-22 16:42 FredGrit 阅读(18) 评论(0) 推荐(0) 编辑
摘要:if(System.IO.File.Exists(imgPath)) { System.Diagnostics.Process.Start(imgPath); } //xaml <Window x:Class="WpfApp261.MainWindow" xmlns="http://schemas. 阅读全文
posted @ 2024-08-21 20:18 FredGrit 阅读(5) 评论(0) 推荐(0) 编辑
摘要:Install-Package ExcelDataReader using ExcelDataReader; using System.Text; using System.IO; namespace ConsoleApp50 { internal class Program { static vo 阅读全文
posted @ 2024-08-20 20:40 FredGrit 阅读(5) 评论(0) 推荐(0) 编辑
摘要:namespace ConsoleApp49 { internal class Program { static void Main(string[] args) { BTreeDemo(); Console.WriteLine("BTree!"); } static void BTreeDemo( 阅读全文
posted @ 2024-08-20 20:22 FredGrit 阅读(5) 评论(0) 推荐(0) 编辑
摘要://xaml <UserControl x:Class="WpfApp250.BookControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsof 阅读全文
posted @ 2024-08-17 16:23 FredGrit 阅读(14) 评论(0) 推荐(0) 编辑
摘要://Customize LineArrow using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System. 阅读全文
posted @ 2024-08-16 20:21 FredGrit 阅读(14) 评论(0) 推荐(0) 编辑
摘要:From .net 8.0 the can retrieve DateTime.Now.MicroSecond directly,but when you use the classic .net framework it does not work at all. I'll show a roun 阅读全文
posted @ 2024-08-16 10:47 FredGrit 阅读(15) 评论(0) 推荐(0) 编辑
摘要:<behavior:Interaction.Triggers> <behavior:EventTrigger EventName="KeyDown"> <behavior:CallMethodAction MethodName="Window_KeyDown" TargetObject="{Bind 阅读全文
posted @ 2024-08-15 20:19 FredGrit 阅读(27) 评论(0) 推荐(0) 编辑
摘要://xaml <UserControl x:Class="WpfApp246.EllipseTbk" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft 阅读全文
posted @ 2024-08-15 16:06 FredGrit 阅读(5) 评论(0) 推荐(0) 编辑
摘要://Custom Control //xaml <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/wi 阅读全文
posted @ 2024-08-14 11:34 FredGrit 阅读(5) 评论(0) 推荐(0) 编辑
摘要:Install-Package Aspose.Imaging using (Aspose.Imaging.Image aspImg = Aspose.Imaging.Image.Load(rawImgUrl)) { Aspose.Imaging.RasterImage rasterImg = asp 阅读全文
posted @ 2024-08-08 19:43 FredGrit 阅读(8) 评论(0) 推荐(0) 编辑
摘要:<behavior:Interaction.Triggers> <behavior:EventTrigger EventName="KeyDown"> <behavior:CallMethodAction MethodName="WinKeyDown" TargetObject="{Binding} 阅读全文
posted @ 2024-08-06 23:31 FredGrit 阅读(8) 评论(0) 推荐(0) 编辑
摘要://xaml <Window x:Class="WpfApp233.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/ 阅读全文
posted @ 2024-08-06 22:53 FredGrit 阅读(35) 评论(0) 推荐(0) 编辑
摘要:<DataGridTemplateColumn Header="Select"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <CheckBox IsThreeState="False"> <behavior:Interaction.Tr 阅读全文
posted @ 2024-08-06 21:36 FredGrit 阅读(17) 评论(0) 推荐(0) 编辑
摘要://xaml <Window x:Class="WpfApp229.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/ 阅读全文
posted @ 2024-08-05 19:50 FredGrit 阅读(11) 评论(0) 推荐(0) 编辑
摘要:private void InitRenderTransfrom() { TransformGroup tg = new TransformGroup(); ScaleTransform st = new ScaleTransform(); if (!tg.Children.Contains(st) 阅读全文
posted @ 2024-08-02 19:54 FredGrit 阅读(13) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示