Abstract: When binding, if you can specify the Path (Name) of the data source attribute, you can specify the Source and ElementName. However, sometimes the data source to be bound may not have an explicit Path (Name), so you need to specify the binding source attribute by using the RelativeSource attribute of the Binding object. In short, it is to specify the currentread the whole passage
Abstract: WPF class inheritance diagram Object class: inThe root type DispatcherObject class of all types in Net: Most objects in WPF derive from DispatcherObject, which provides basic construction for handling concurrency and threads.WPF is based on the message system implemented by the scheduler.DependencyObject class: representing a parameterread the whole passage
Abstract: Use Lazy<>to elegantly solve the asynchronous requirements in constructors. Since the beginning of netframework 4.0, C # has supported delayed initialization. Through the Lazy keyword, we can declare that an object is reinitialized only when it is used for the first time. If it is not called, it will not be initialized, which saves some unnecessary overhead,Improved efficiency Thread safety By default, this class'sread the whole passage
Abstract: Expression and ExpressionTree LINQ expressions (Expression) can assign lambda expressions to Func or Action type delegates to process collections in memoryNET compiler converts lambda expressions assigned to Func or Action type delegates into executable code at compile time.LINQ introduced a new technology called Eread the whole passage
Summary: LINQ operatorLINQ filter operatorWhere filter operators in LINQ filter sequences (sets) according to some given criteria.The following table lists all available filter operators in LINQ.The filter operator describes where to return a value from the collection according to the predicate function.OfType returns the value in the collection according to the specified type.However, it depends on whether they can convert to the specified type.read the whole passage
Abstract: The Quartz version is required to be higher than 3.2 to install Install Package QuartzExtensions.Hosting Quartz.Extensions.Hosting package contains QuartzExtensions.DependencyInjection, please consult Quartz for detailsExtensionsread the whole passage
Abstract: AspNetCore3.1. x runs Windows Service and installs the corresponding expansion pack Nuget install MicrosoftExtensions.Hosting.Public class Program {public stread the whole passage
Abstract: When using Flurl as an HttpClient to request from the server, the request may fail due to network or other reasons, such as HttpStatusCodeNotFound、HttpStatusCode.ServiceUnavailable、HttpStatusCode.RequestTimeout, etc;There areread the whole passage
Absrtact: C # obtains the connection status of WIFI. This article is to obtain the connection status of the device when the name of the WIFI network device is known. It can also determine whether the WAN has been connected. At first, the idea was whether there was such a direct access to device information. Through this returned information, I can get the status I want. I found a data that there is a libiw on Linux,The information about the ssid that this package can scan is not what I wantread the whole passage
Absrtact: Sometimes, when processing Http requests, we are lazy and don't want to define a model to process them. It is very convenient to use Dynamic to directly operate the requested data. Dynamic keyword and dynamic language runtime (DLR) in C # areNew features in Net 4.0.What is "dynamic" programming language can sometimes be divided into static typing language and dynamic typing language.read the whole passage
Summary: First, create a blank solution WPF With AspNet WebApi II, CreateWPF project WpfApp 3 of Net5, createAsp. of Net5Net WebApi project WebApiProvidor 4. Modify WebApiProvider project and WpfApp project Modify the output type of WebApiProvider projectread the whole passage
Summary: To install the Single Page Application (SPA) templates, run the following command: dotnet new -- install MicrosoftAspNetCore.SpaTemplates:: * Create AspNetread the whole passage
Abstract: Use the WindowChrome property of Window to preserve the shadow effect of the borderless form, double click of the title bar, drag and drop of the title bar. The title bar close button is different from the minimize, maximize, and restore button styles. First BasedOn="{StaticResource WindowButtonStyle}", then use different background colors after MouseOver. Pay attention to the close buttonread the whole passage
Abstract: The dotnet core and ubuntu arm32 development experience select a development board that supports ubuntu and is compatible with wiringPI InstallingNet core On Linux ARM32/64 Installing .NET Core on Linux ARM64 The following intread the whole passage
Absrtact: git clone MvvmLight fails. If the network is broken, there is no way to directly modify the source code. Nuget is used to install MvvmLightLibsStd10. GalaSoft is usedMvvmLight.The ReplayCommand under the Command namespace will have a bug. The return of CanExecute will not update the UIread the whole passage
Absrtact: Purpose Due to some requirements, it is necessary to monitor the files under the concerned folder at all times, including renaming, adding, deleting, modifying, etc. Because the number of folder files is large, it will be a waste of time to rescan the entire file every timeThe scheme uses FileSystemWatcher to monitor these interesting changes. The example code is using System;using System.IO; naread the whole passage
Abstract: Refer to AutofacExtras.CommonServiceLocator implements ServiceCollectionServiceLocator to use MicrosoftExtensions.DependencyInjection Using HttpClientFactory Referenceread the whole passage
Abstract: 1Use EventToCommand in Mvvmlight, and MvvmlightWindows.Extension of some aspects of Interactivity.dll view: viewmodel 2HandyControl implemented with HandyControlInteractivity viread the whole passage
Abstract: IsAsync in wpf is not ideal in some cases. Directly, the code public sealed class NotifyTaskCompletion<TResult>: INotifyPropertyChanged {public NotifyTaskCompletion (Task<TResultread the whole passage