in m1 parallels desktop
| /ms | net472 | net8 | net8-aot |
|---|---|---|---|
| console | 8-29 | 45 | |
| wpf-Loaded | 90-120 | 260 | - |
| console(cold) | 21 | 200 | |
| wpf-Loaded(cold) | 250 | 342 | - |
| extension(DependencyObject obj) | |
| { | |
| public Observable<T> GetObservable<T>(DependencyProperty property) | |
| { | |
| var descriptor = DependencyPropertyDescriptor.FromProperty(property, obj.GetType()); | |
| return Observable | |
| .FromEventHandler( | |
| h => descriptor.AddValueChanged(obj, h), | |
| h => descriptor.RemoveValueChanged(obj, h)) | |
| .Select(_ => (T)obj.GetValue(property)) |
| public partial class App : BlazoniaApplication<MainWindow> | |
| { | |
| public override void Initialize() | |
| { | |
| AvaloniaXamlLoader.Load(this); | |
| } | |
| } |
| <Project Sdk="Microsoft.NET.Sdk"> | |
| <PropertyGroup> | |
| <OutputType>WinExe</OutputType> | |
| <TargetFramework>net9.0-windows10.0.26100.0</TargetFramework> | |
| <UseWinUI>true</UseWinUI> | |
| <Nullable>enable</Nullable> | |
| <ImplicitUsings>true</ImplicitUsings> | |
| <ApplicationManifest>app.manifest</ApplicationManifest> | |
| </PropertyGroup> | |
| public class SplashScreen | |
| { | |
| public static SplashScreen Show(string imagePath) | |
| { | |
| using var image = Image.FromFile(imagePath); | |
| return InternalShow(image); | |
| } | |
| public static SplashScreen Show(Stream stream) | |
| { |
in m1 parallels desktop
| /ms | net472 | net8 | net8-aot |
|---|---|---|---|
| console | 8-29 | 45 | |
| wpf-Loaded | 90-120 | 260 | - |
| console(cold) | 21 | 200 | |
| wpf-Loaded(cold) | 250 | 342 | - |
| public static T? XmlDeserializer<T>(string text) | |
| { | |
| var serializer = new XmlSerializer(typeof(T)); | |
| using var reader = new StringReader(text); | |
| var result = (T?)serializer.Deserialize(reader); | |
| return result; | |
| } |
| using System.Windows.Threading; | |
| using System.Windows; | |
| using System.Windows.Interop; | |
| namespace MagnifierWpf; | |
| public class MagWindow : Window | |
| { | |
| private float magnification; | |
| private int _sourceWidth = 400; |
| using Microsoft.Win32; | |
| using System; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| namespace Installer | |
| { | |
| public class Installer |
| SSD HDD 没有显著区别 | |
| cHECK Window Name, Alt + F4 | |
| ms | |
| WinUI3 with some simple controller Publish win-x64 release R2R SSD i5 | |
| 0.3279 | |
| 0.3317 | |
| 0.3152 | |
| 0.3150 | |
| 0.3295 |
| <ui:FlyoutService.Flyout> | |
| <ui:CommandBarFlyout x:Name="AssistiveTouchFlyout" ShowMode="Standard"> | |
| <ui:AppBarButton Click="VolumeDownOnClick" ToolTip="{x:Static resx:Strings.GameView_VolumeDecreaseTip}"> | |
| <ui:AppBarButton.Icon> | |
| <ui:FontIcon Glyph="{x:Static contract:CommonGlyphs.Volume1}" /> | |
| </ui:AppBarButton.Icon> | |
| </ui:AppBarButton> | |
| <ui:AppBarButton Click="VolumeUpOnClick" Icon="Volume" ToolTip="{x:Static resx:Strings.GameView_VolumeIncreaseTip}" /> | |
| <ui:AppBarButton x:Name="FullScreenSwitcher" Click="FullScreenSwitcherOnClick" /> | |
| <ui:AppBarToggleButton x:Name="LoseFocusToggle" Icon="Trim" ToolTip="{x:Static resx:Strings.GameView_FocusTip}" /> |