随笔分类 - wpf
wpf xaml
摘要:1.C++ Dll project //D:\C\CPPServiceDll\CPPServiceDll\BookNativeLib.h #pragma once #include <string> #include <vector> #include <chrono> struct Book {
阅读全文
摘要:Install-Package Microsoft.Xaml.Behaviors.Wpf public class GridBehavior : Behavior<Grid> { private ContextMenu contextMenu; public GridBehavior() { con
阅读全文
摘要:Install-Package System.Management private string GetGPUMem() { StringBuilder builder = new StringBuilder(); ManagementObjectSearcher searcher = new Ma
阅读全文
摘要:<ItemsControl ItemsSource="{Binding BooksCollection}"> <ItemsControl.Template> <ControlTemplate TargetType="ItemsControl"> <DockPanel LastChildFill="T
阅读全文
摘要:public class DataGridRightClickBehavior : Behavior<DataGrid> { public ICommand SaveSelectedCommand { get { return (ICommand)GetValue(SaveSelectedComma
阅读全文
摘要:Install-Package MessagePack Install-Package Newtonsoft.json public class ImgUrlToImgSourceConverter : IValueConverter { Dictionary<string, WeakReferen
阅读全文
摘要:public class DelCommand : ICommand { private Action<object?>? syncExecute; private readonly Func<object?, Task> asyncExecute; private Predicate<object
阅读全文
摘要:<Window x:Class="WpfApp6.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/200
阅读全文
摘要:Install-Package Newtonsoft.json public async Task GetServiceDataAsync() { string bookUrl = "https://localhost:7205/api/book"; using (HttpClient hclien
阅读全文
摘要:public class VirtualizingGridPanel : VirtualizingPanel, IScrollInfo { public double ColumnWidth { get; set; } = 200; public double ItemHeight { get; s
阅读全文
摘要:public class DelCommand : ICommand { private Action<object?> execute; private Predicate<object?> canExecute; public DelCommand(Action<object?> execute
阅读全文
摘要:Install-Package communitytoolkit.mvvm Install-Package Microsoft.Extensions.DependencyInjection <Application x:Class="WpfApp3.App" xmlns="http://schema
阅读全文
摘要:<DataGrid.ContextMenu> <ContextMenu> <MenuItem Header="Export Selected" Command="{Binding ExportSelectedCommand}" CommandParameter="{Binding RelativeS
阅读全文
摘要:Install-Package ZXing.Net Install-Package Newtonsoft.Json public static class QrCodeGenerator { public static BitmapImage GeneratorBookQrCode(Book bk,
阅读全文
摘要:Get-Project -All|Install-Package livecharts.wpf Get-Project -All|Install-Package Prism.DryIoc -version 8.1.97 Get-Project -All|Install-Package Prism.W
阅读全文
摘要://MainWindow.xaml <Window x:Class="WpfApp49.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.micr
阅读全文
摘要:Get-Project -All| Install-Package Prism.Wpf -v 8.1.97; Get-Project -All| Install-Package Prism.DryIOC -v 8.1.97; //MainWindow.xaml <Window x:Class="Wp
阅读全文
摘要:private void LoadImagesFromResources() { // 1. Get the CarProject assembly Assembly carAssembly = Assembly.GetExecutingAssembly(); string assemblyName
阅读全文
摘要:Install-Package Prism.Wpf -v 8.1.97; Install-Package Prism.DryIOC -v 8.1.97;Install-Package System.Runtime.Caching; //memory cache CacheItemPolicy cac
阅读全文
摘要:Install-Package Prism.Wpf Install-Package Prism.DryIOC //App.xaml <prism:PrismApplication x:Class="WpfApp46.App" xmlns="http://schemas.microsoft.com/w
阅读全文

浙公网安备 33010602011771号