惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
MyScale Blog
MyScale Blog
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Proofpoint News Feed
D
Docker
Jina AI
Jina AI
博客园 - 三生石上(FineUI控件)
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Forbes - Security
Forbes - Security
MongoDB | Blog
MongoDB | Blog
Attack and Defense Labs
Attack and Defense Labs
Webroot Blog
Webroot Blog
A
About on SuperTechFans
Schneier on Security
Schneier on Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
Microsoft Azure Blog
Microsoft Azure Blog
F
Fortinet All Blogs
IT之家
IT之家
The Last Watchdog
The Last Watchdog
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
Project Zero
Project Zero
B
Blog
Recorded Future
Recorded Future
博客园_首页
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
SegmentFault 最新的问题
Security Archives - TechRepublic
Security Archives - TechRepublic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hacker News: Front Page
T
Threatpost
H
Heimdal Security Blog
Cloudbric
Cloudbric
Google Online Security Blog
Google Online Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog

博客园 - FredGrit

WPF two separated datagrid scroll synchronously both in horizontal and vertical via behavior WPF ContentControl Template is ControlTemplate, ContentTemplate is DataTemplate and must assign value to Content explicitly WPF TreeView show WCF config file WPF itemscontrol loaded downloaded data from WCF via httpclient WPF TreeView HierarchicalDataTemplate DataTemplate, Enum get enum name WPF consume xml generated by WCF , C# deserialize xml to List WPF implemented ICommand and IDisposable WPF ContextMenu,MenuItem command can binding to datacontext's command directly WPF usercontrol pass contextmenu command via implemented Freezable class which does not attach on Visual tree, then invoked in caller MVVM WPF consume data generate by WCF and save via ContextMenu Command in MVVM C# export List<T> to excel file via EPPlus WPF ContextMenu does not rely on host visual tree, the Freezable can exist independently, convey dependency property in usercontrol to caller C# JsonConvert DeserializeObject MissingMemberHandling.Ignore when the source model is completed and the required is partial Freezable objects do not require attachment to the WPF visual tree, maintain a persistent lifetime, and serve as a reliable binding relay between a detached ContextMenu and its parent host control. C# run httplistener to act as service application asynchronously in console, semaphoreslim allow the max concurrent number WPF Microsoft.Xaml.Behaviors.WPF, EventTrigger EventName="PreviewMouseDown" the tunnel event, while the MouseDown can't trigger the command because it was swallowed WPF customize command implemented ICommand, volatile read method is thread safe, preventing cpu and comipler reorder and optimization. WPF ItemsControl load huge 50M+ data WPF consume data generated by WCF periodically in json format WPF customize command based on ICommand and manually trigger WPF consume data generated by grpc services C# produce and consume data via Google.Protobuf WCF produce message and WPF consume periodically via DispatcherTimer WCF deconstruct WebConfig includes bindings, behaviors, service, endpoint ,serviceHostingEnvironment C# insert data into SQLite in batch periodically WPF SQLite SQLiteStudio WPF customize MultiSelectComboBox based on combobox WPF DataGrid Context menu binding command and commandparameter to datacontext WCF set fixed port as http://localhost:8888/ via Project /Properties/web/project url to create virtual directory WPF customize datagrid behavior based on behavior&lt;datagrid&gt; with command and command parameter WPF Microsoft Visual Studio XAML designer is busy WCF WebHttpBinding support both http and https WCF support basicHttpBinding and webHttpBinding - FredGrit WCF TestClient set fixed configuration file WPF consume http json and update periodically via DispatcherTimer WPF Prism.Core version 9.0.537 implemented navigation register singleton with splash screen, pass global variable via RegisterSingleton method WPF render periodically via DispatcherTimer, customize behavior - FredGrit Python cosume WCF service via requests in json format WPF call webHttpBinding from WCF WCF binding webHttpBinding is used to web browser in json format both in request and response WPF invoke WCF dll periodically via DispatcherTimer WCF webHttpBinding is open for web browser and wpf WPF DataTemplateSelector WPF DataGrid customize behavior with multiple commands and command parameters then invoke in mvvm WPF DataGrid behavior customize command and command parameter then invoke and implemented in MVVM WPF ItemsControl customize behavior and save all items WCF service can be accessed by browser WPF WCF produce data as service and WPF consume data as client periodically WPF GRPC and Probuf generated data as service then consume by wpf periodically WPF customize behavior based on Microsoft.Xaml.Behaviors.Wpf with command and commandparameter WPF call data from CPP wrapper dll via CLI\CLR - FredGrit WPF customize behavior WPF get gpu information via System.Management WPF ItemsControl IsItemsHost=True WPF Customize behavior and dependency property command C# Serilog, Serilog.Sinks.Console, Serilog.Sinks.File C# Serilog both in file and console Windows powershell view huge file via command C# serialize huge data more than 100M via splitting into batch and concatenating as one big json file C# serialize datetime then deserialize, print lose precision. resolve by ToString(&quot;o&quot;) C# produce data and send via WebSocket as service, Python,Flask,HTML as consumer invoke periodically C# write generated data service and sent via websocket, then consume by python periodically C# DateTime print precision to microseconds C# WebSocket console as service provide data, another console as client,send request periodically C# WebAPI [HttpGet(&quot;{cnt}&quot;] pass argument WPF implement ICommand with async execute WPF ListBox control virtualization in mvvm WPF Data Source invoke from web api C# WebAPI
WPF WeakReference
FredGrit · 2026-03-29 · via 博客园 - FredGrit
Install-Package MessagePack
Install-Package Newtonsoft.json
public class ImgUrlToImgSourceConverter : IValueConverter
{
    Dictionary<string, WeakReference<BitmapImage>> imgCache = new Dictionary<string, WeakReference<BitmapImage>>();
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        try
        {
            string? imgUrl = value?.ToString();
            if (!string.IsNullOrEmpty(imgUrl) && File.Exists(imgUrl))
            {
                if (imgCache.TryGetValue(imgUrl, out var weakRef) && weakRef.TryGetTarget(out var cachedImg))
                {
                    return cachedImg;
                }
                BitmapImage bmi = new BitmapImage();
                bmi.BeginInit();
                bmi.UriSource = new Uri(imgUrl, UriKind.RelativeOrAbsolute);
                bmi.CacheOption = BitmapCacheOption.OnDemand;
                bmi.CreateOptions = BitmapCreateOptions.DelayCreation;
                bmi.EndInit();
                if (bmi.CanFreeze)
                {
                    bmi.Freeze();
                }
                imgCache[imgUrl] = new WeakReference<BitmapImage>(bmi);
                return bmi;
            }
            return null;
        }
        catch (Exception ex)
        {
            return null;
        }
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
2026-03-29T22:13:36.6861304+08:00,start:0,end:49999999,batch size:1000000,batch_count:51
'WpfApp9.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\10.0.4\System.Numerics.Vectors.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApp9.exe' (CoreCLR: clrhost): Loaded 'D:\C\WpfApp9\WpfApp9\bin\Debug\net10.0-windows\Newtonsoft.Json.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApp9.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\10.0.4\System.Runtime.Numerics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApp9.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\10.0.4\System.Linq.Expressions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WpfApp9.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\10.0.4\System.Data.Common.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
2026-03-29 22:13:37,startIdx:0,endIdx:1000000,batch:1
2026-03-29 22:13:38,startIdx:1000000,endIdx:2000000,batch:2
2026-03-29 22:13:39,startIdx:2000000,endIdx:3000000,batch:3
2026-03-29 22:13:40,startIdx:3000000,endIdx:4000000,batch:4
2026-03-29 22:13:43,startIdx:4000000,endIdx:5000000,batch:5
2026-03-29 22:13:44,startIdx:5000000,endIdx:6000000,batch:6
2026-03-29 22:13:44,startIdx:6000000,endIdx:7000000,batch:7
2026-03-29 22:13:45,startIdx:7000000,endIdx:8000000,batch:8
2026-03-29 22:13:46,startIdx:8000000,endIdx:9000000,batch:9
2026-03-29 22:13:49,startIdx:9000000,endIdx:10000000,batch:10
2026-03-29 22:13:50,startIdx:10000000,endIdx:11000000,batch:11
2026-03-29 22:13:51,startIdx:11000000,endIdx:12000000,batch:12
2026-03-29 22:13:52,startIdx:12000000,endIdx:13000000,batch:13
2026-03-29 22:13:52,startIdx:13000000,endIdx:14000000,batch:14
2026-03-29 22:13:54,startIdx:14000000,endIdx:15000000,batch:15
2026-03-29 22:13:56,startIdx:15000000,endIdx:16000000,batch:16
2026-03-29 22:13:58,startIdx:16000000,endIdx:17000000,batch:17
2026-03-29 22:13:59,startIdx:17000000,endIdx:18000000,batch:18
2026-03-29 22:14:00,startIdx:18000000,endIdx:19000000,batch:19
2026-03-29 22:14:00,startIdx:19000000,endIdx:20000000,batch:20
2026-03-29 22:14:02,startIdx:20000000,endIdx:21000000,batch:21
2026-03-29 22:14:05,startIdx:21000000,endIdx:22000000,batch:22
2026-03-29 22:14:06,startIdx:22000000,endIdx:23000000,batch:23
2026-03-29 22:14:07,startIdx:23000000,endIdx:24000000,batch:24
2026-03-29 22:14:08,startIdx:24000000,endIdx:25000000,batch:25
2026-03-29 22:14:09,startIdx:25000000,endIdx:26000000,batch:26
2026-03-29 22:14:10,startIdx:26000000,endIdx:27000000,batch:27
2026-03-29 22:14:12,startIdx:27000000,endIdx:28000000,batch:28
2026-03-29 22:14:15,startIdx:28000000,endIdx:29000000,batch:29
2026-03-29 22:14:16,startIdx:29000000,endIdx:30000000,batch:30
2026-03-29 22:14:17,startIdx:30000000,endIdx:31000000,batch:31
2026-03-29 22:14:17,startIdx:31000000,endIdx:32000000,batch:32
2026-03-29 22:14:18,startIdx:32000000,endIdx:33000000,batch:33
2026-03-29 22:14:19,startIdx:33000000,endIdx:34000000,batch:34
2026-03-29 22:14:21,startIdx:34000000,endIdx:35000000,batch:35
2026-03-29 22:14:25,startIdx:35000000,endIdx:36000000,batch:36
2026-03-29 22:14:26,startIdx:36000000,endIdx:37000000,batch:37
2026-03-29 22:14:27,startIdx:37000000,endIdx:38000000,batch:38
2026-03-29 22:14:28,startIdx:38000000,endIdx:39000000,batch:39
2026-03-29 22:14:29,startIdx:39000000,endIdx:40000000,batch:40
2026-03-29 22:14:30,startIdx:40000000,endIdx:41000000,batch:41
2026-03-29 22:14:31,startIdx:41000000,endIdx:42000000,batch:42
2026-03-29 22:14:32,startIdx:42000000,endIdx:43000000,batch:43
2026-03-29 22:14:35,startIdx:43000000,endIdx:44000000,batch:44
2026-03-29 22:14:38,startIdx:44000000,endIdx:45000000,batch:45
2026-03-29 22:14:39,startIdx:45000000,endIdx:46000000,batch:46
2026-03-29 22:14:40,startIdx:46000000,endIdx:47000000,batch:47
2026-03-29 22:14:41,startIdx:47000000,endIdx:48000000,batch:48
2026-03-29 22:14:42,startIdx:48000000,endIdx:49000000,batch:49
2026-03-29 22:14:43,startIdx:49000000,endIdx:49999999,batch:50
2026-03-29 22:14:43,start:0,end:49999999,jsonFile:Json_202603292213367039.json finished