Sometimes it is necessary to call an async method from a method that is not marked async, for example during a synchronous version implementation of an asynchronous method. For this, it is possible to build a synchronous task by using an asynchronous lambda function. For example, either the following asynchronous method, taking a parameter of … Continue reading async / await: calling an async method from a non-async method
Obtaining information about the caller of a method is very useful in the property binding and log function scenarios. Traditionally, the following processes would be implemented: to identify the calling method: To simply identify the calling method, one can still examine the stack trace, in which the StackFrame objects (namespace System.Diagnostics) provide the GetMethod and … Continue reading C #: Get information about the caller of a method
According to the dictionary (not that of resources , but rather that of the English language: the freed dictionary, "an inflector is the way a word is changed or modified in form in order to reach a new specific meaning". In the case of a WPF resource dictionary, a key inflection mechanism makes it possible … Continue reading WPF: Developing an inflector of resource dictionary keys
1. What is ANTLR? ANTLR4 is a lexer / parser generator. A parser takes a text input, and according to a grammar, extracts the recognized lexicons terms (action of the lexer), and produce an AST: Abstract Syntax Tree (action of the parser). We can have parsers without grammars (the PEG: Parsing Expression Grammar, which are … Continue reading First steps with ANTLR4 in C #
Your latest software creation is ready and should be disseminated beyond your borders? So it's time to translate (localization) the resources used. We will see in this ticket a simple way to do it using the appropriate tools: • Visual studio compiler msbuild • free tool Visual Locbaml 1. Preparing the application for localization The … Continue reading Localize a .NET application with locbaml – excel – csvtransformer
The ClickOnce Microsoft technology will install a Windows application from a single link on a web page. In practice it is a file (setup.exe or .application), which allows the Windows system to start the installation by recovering all the necessary files from the WEB server. This technology can also work via the network neighborhood. The … Continue reading Installing applications using Microsoft ClickOnce technology
Wpf Easing fonctions, otherwise known as the acceleration functions, are functions that slow down or accelerate the motion of an animation according to a mathematical formula. In this post we will see how to make a small WPF application that lists and draws the Easing functions available in the WPF framework. Let's start with the … Continue reading Trace the WPF easing functions
The animation of the zoom (see the previous post: Zoom the UI with WPF ) is done simply by using the mechanism of timer and synchronization provided by the classes WPF. In the case of zoom, you must use the DoubleAnimation value animation class. The code previously seen that applies the zoom value to the … Continue reading Animated Zoom with WPF
How to add the ability to zoom a WPF control and content? We must nest the control or controls that we want to zoom simultaneously in one Grid, on which we apply a transformation Layout type transformation scale. For example : [xml] <Grid.LayoutTransform> </Grid.LayoutTransform> [/xml] the following C # method will apply the desired zoom … Continue reading Zoom the UI with WPF
The animation is an important part of user experience in modern interfaces, whether Web or Desktop. WPF responds to this problem in a very complete way by providing in the .NET framework classes of time management (timers, editing table) and synchronization of controls (calculation and updating of properties). In this article we will see a … Continue reading Animate under WPF via C # extension methods – Part 1