background preloader

WPF

Facebook Twitter

StringFormat : une simplification Xaml trop peu utilisée. [new:15/01/2013]Mettre en page des éléments variables ou formatés en XAML peut parfois sembler fastidieux, c’est oublier qu’il existe des astuces de Binding comme le StringFormat qui simplifient beaucoup les choses… De Silverlight à Windows Phone 8 et WinRT Le principe est le même et les options sont semblables.

StringFormat : une simplification Xaml trop peu utilisée

Cet article s’applique ainsi à toutes les versions de XAML implémentant StringFormat. [WPF] Automatically sort a GridView when a column header is clicked » Thomas Levesque's .NET blog. [WPF] Automatically sort a GridView (continued) » Thomas Levesque's .NET blog. Using System.ComponentModel; using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; using System.Windows.Documents;

[WPF] Automatically sort a GridView (continued) » Thomas Levesque's .NET blog

November » 2015 » Thomas Levesque's .NET blog. Async code is a great way to keep your app’s UI responsive.

November » 2015 » Thomas Levesque's .NET blog

You can start an async operation from the UI thread, await it without blocking the UI thread, and naturally resume on the UI thread when it’s done. This is a very powerful feature, and most of the time you don’t even need to think about it; it “just works”. However, this works only if the async operation is started from a thread that has a synchronization context (such as the UI thread in Windows Forms, WPF or WinRT). If you don’t have a sync context when the async operation starts, or if resuming on the sync context is explicitly disabled with ConfigureAwait(false), then the method resumes on a thread pool thread after the await, and there is no obvious way to get back to the UI thread. For instance, let’s assume you want to do something like this: This method starts an async operation to retrieve some data, and doesn’t resume on the UI thread, because it has some work to do in the background. WPF ListView ItemContainerStyle - How to Apply.

ListView ItemContainerStyle specifies a style that is used by every generated ListViewItem for styling it.

WPF ListView ItemContainerStyle - How to Apply

You can create a Style inline or in the Resources section and set the ItemContainerStyle property of ListView. You can set ItemContainerStyle as StaticResource or DynamicResource. When to Use? By default you cannot modify style of ListViewItem in WPF ListView. Only by using ItemContainerStyle, you can change the styles of every ListViewItem. WPF MultiTrigger and MultiDataTrigger - The complete WPF tutorial.

In the previous chapter, we worked with triggers to get dynamic styles.

WPF MultiTrigger and MultiDataTrigger - The complete WPF tutorial

So far they have all been based on a single property, but WPF also supports multi triggers, which can monitor two or more property conditions and only trigger once all of them are satisfied. There are two types of multi triggers: The MultiTrigger, which just like the regular Trigger works on dependency properties, and then the MultiDataTrigger, which works by binding to any kind of property. Let's start with a quick example on how to use the MultiTrigger. How to Remove default Image of DatePicker. C# - Find Item in ObservableCollection without using a loop. How to send string and content messages with MVVM Light Messenger. Home > C#, MVVM, Windows Phone, WinRT > How to send string and content messages with MVVM Light Messenger The Messenger component of MVVM Light easily allows to pass data between classes of our app: To send an object, we simply need to pass it to the Messenger.Send method.

How to send string and content messages with MVVM Light Messenger

But what if we just want to send string messages, like GotoDetailsPage or CloseApp? In this case, we don’t want to create a new class only to pass a string. C# - WPF DatePicker, display todays date with binding to property. Making Timeline Control for DataGrid in WPF. In this article we will see how we can make a Timeline control in WPF.

Making Timeline Control for DataGrid in WPF

Making Timeline Control for DataGrid In WPF Introduction Creating A WPF Project. LINQ Inner Join with AND and OR condition. Posted By : Shailendra Chauhan, 16 Jul 2014 Updated On : 16 Jul 2014 LINQ has a JOIN query operator that provides SQL JOIN like behavior and syntax.

LINQ Inner Join with AND and OR condition

As you know, Inner join returns only those records or rows that match or exists in both the tables. The simple inner join example is given below: DataContext context = new DataContext();var q = (from pd in context.Products join od in context.Orders on pd.ProductID equals od.ProductID orderby od.OrderID select new { od.OrderID, pd.ProductID, pd.Name, pd.UnitPrice, od.Quantity, od.Price, }).ToList(); Inner Join with AND condition Sometimes, you need to apply inner join with and condition. DataContext context = new DataContext();var q=from cust in context.tblCustomer join ord in context.tblOrder// Both anonymous types should have exact same number of properties having same name and datatype on new {a=(int?)

Retourner l'union définie de deux séquences. MVVM : Event Routing to the Child ViewModel. Introduction Currently, MVVM pattern is the most recommended pattern for designing the architecture of the WPF application.

MVVM : Event Routing to the Child ViewModel

MVVM principle is based on the following component: Generally, we design our application in the same way where there is one ViewModel for a View. ViewModel is responsible to provide/update the data and event handling for its view. It’s clear from the above diagram that for controls such as Button, ContextMenu etc there is an event handler e.g. Note: View and ViewModel Binding is done by using DataContext or Content [if Element used in XAML is ContentControl]. Background/Objective. WPF INotifyPropertyChanged.

Comment regrouper des éléments dans une liste ou une grille (XAML) Lorsqu’un ListView ou GridView est lié à une source de données qui contient des groupes de données, vous pouvez afficher les données groupées dans la liste ou la grille.

Comment regrouper des éléments dans une liste ou une grille (XAML)

Il existe plusieurs façons de regrouper des données venant s’insérer dans votre application La source de données peut être une liste d’éléments dans laquelle chaque élément contient également une liste d’éléments. Mettre à jour les éléments GridView et ListView de façon incrémentielle (XAML) - Windows app development. Quand un contrôle ListView ou GridView contient de nombreux éléments et que l’utilisateur les fait défiler rapidement, l’affichage intégral du contenu de chaque élément peut utiliser un grand nombre des ressources de l’interface utilisateur.

WPF

Google. Linux. Builder. Construisez des logiciels et des solutions web sans programmer. NOUT Builder est la première plateforme de construction d’applications windows et web 100% par paramétrage. Économisez 70% du travail de réalisation avec les fonctions pré-packagées (planning, messagerie, fusion documentaire, gestion des droits et licences, import export…) et réalisez des applications ergonomiques et évolutives en un temps record. Avec NOUT Builder la réalisation est : - plus rapide - plus sure - plus facile Et le résultat est plus évolutif, modifiable même par l’utilisateur final.

Comment ça marche ? Erreur "OutOfMemoryError: Java heap space" Community Managers : ont-ils encore un futur ? Une conférence Web internationale que j’ai organisée en février pour le CMAD et une discussion récente avec un confrère d’Adobe ont éveillé mon attention et m’ont incité à prendre la plume. Laravel : Eloquent.

Learning

WPF Calendar View, Schedule Control, Scheduler. Wpf-Schedule control provides you with the great multi-user calendar control including powerful recurring appointments engine. Our scheduler control uses the Model/View architecture where actual appointments are separated from the User Interface presentation. That way the appointments can be presented in number of different views and new views can be added easily. Muhammad Shujaat Siddiqi: Binding ObservableCollection to Text Properties. In this post we will be discussing the issue when we bind a collection based (ObservableCollection) property to some scalar DependencyProperty e.g. Text property of a TextBlock. Let's create a sample MVVM Light based WPF application. Note: Yes, you would need an installation of MVVM Light in order to follow this example. Let's update MainWindow's definition as follows: The above view has some expectations from view model. A Simple WPF Application Implementing MVVM.

Before starting with the project let me explain about WPF, Silverlight and MVVM for those who are new to those areas. Short form for Windows Presentation Foundation. Next generation of Windows applications / Winforms. Uses XAML for UI. Supports media, documents and graphics. Silverlight Cross-platform, cross-browser platform for delivering rich, interactive applications. C# - MVVM List and ObservableCollection. RelayCommands and WeakFuncs. This week I was deep inside refactoring a huge very non-MVVM-y graphics codebase we have. This codebase is not a standalone tool but rather a library of WPF UserControls and graphics capabilities which is used in several tools in the department – both for internal use and in the HMI, which we finally give to our customers (I remind you that I work for BrightSoure Energy and we build solar power plants!

How cool is that, huh?). WPF MVVM Pattern: A Simple Tutorial for Absolute Beginners. As part of learning MVVM pattern I tried to search many sites and blogs and found most of them are explained in a complicated manner. After some research I cracked the very basic steps in MVVM pattern, and then trying to write MVVM tutorials for absolute beginners. I don't think much more time or words spend for explaining various part of MVVM and the relationship between MVVM and WPF. If you go to the depth of WPF you will realize that MVVM is the best suitable pattern for WPF (You might not understand the difference between these two) .

As a formal procedure I am giving a simple diagram and definition for MVVM I start this tutorial with two examples, i.e WpfSimple.csproj and WpfMvvmTest.csproj For the sake of simplicity, the first project (WpfSimple.csproj) avoids the Model object (an example with Model will come later). In the example WpfSimple, the view contains only a Button and no code behind, but its click event is loosely bound with ViewModel. Stretching the items in a WPF ListView within a ViewBox. Le prototypage d'interfaces avec Expression Blend 4 et SketchFlow. Comment regrouper des éléments dans une liste ou une grille (XAML) Mettre à jour les éléments GridView et ListView de façon incrémentielle (XAML) - Windows app development. [C#] Comment bien utiliser la GridView dans une application Windows Store - Maxime Frappat. Si vous avez fait un peu de développement WinRT, vous avez surement déjà du utiliser ce composant terriblement efficace quand il est bien utilisé.

Afin (d’essayer) de faire le tour des utilisations possible, nous allons regarder de plus près quelques exemples d’utilisations avec ses avantages et inconvénients. Dans ce billet, on se limitera à la version Windows 8 et non Windows 8.1. MVVM. [Résolu] [Débutant WPF] Premier programme pour s'entrainer à WPF. Déjà, quelques conseils sur le XAML en lui-même : Evite les lignes énorme, mets au maximum deux attributs par ligne. Evite également les hauteurs et largeurs codées en dur, utilise Auto ou * (avec ou sans coefficient) dans les RowDefinitions et ColumnDefinitions. De même, évite les Margins pour positionner un élément.

MVVM. How to create a Grid in WPF Dynamically? The Grid class in WPF represents a Grid control. The following code snippet creates a Grid control, sets its width, horizontal alignment, vertical alignment, show grid lines, and background color. Grid DynamicGrid = new Grid(); DynamicGrid.Width = 400; DynamicGrid.HorizontalAlignment = HorizontalAlignment.Left; DynamicGrid.VerticalAlignment = VerticalAlignment.Top; DynamicGrid.ShowGridLines = true; [C# 4.0] Implémenter un objet dynamique personnalisé » Blog .NET de Thomas Levesque. Comme vous le savez sans doute déjà si vous vous intéressez à l’actualité de .NET, la future version 4.0 de C#, actuellement en beta, introduit un nouveau type appelé dynamic. Vue d'ensemble des modèles de données. Cette section comprend les sous-sections suivantes. <Window x:Class="SDKSample.Window1" xmlns=" xmlns:x=" xmlns:local="clr-namespace:SDKSample" Title="Introduction to Data Templating Sample"><Window.Resources><local:Tasks x:Key="myTodoList"/> ...

</Window.Resources><StackPanel><TextBlock Name="blah" FontSize="20" Text="My Task List:"/><ListBox Width="400" Margin="10" ItemsSource="{Binding Source={StaticResource myTodoList}}"/> ... </StackPanel></Window> Sans DataTemplate. Data Bind Using Only Code Behind - Building Better Software - One Line At A Time. Everything you wanted to know about databinding in WPF, Silverlight and WP7 (Part Two) C# - How do I create 5 buttons and assign individual click events dynamically? Grid.ColumnSpan, propriété attachée (System.Windows.Controls) Grid.ColumnSpan, propriété attachée (System.Windows.Controls) The Roadmap for WPF - WPF Team Blog. The Future of WPF.

Mobile App Development & App Creation Software - Xamarin. [FRENCH] Est-ce la fin de WPF: présent et futur de WPF. Cours VB.NET. Procédure pas à pas : création d'une base de données LocalDB. Création d'une interface utilisateur à l'aide de Blend pour Visual Studio. Méthodologie Model-View-ViewModel avec WPF. Concevoir une application Windows WPF Multi-couche basée sur le MVVM Partie 1. Passage de variable d'une fenetre vers une autre.

[WPF / XAML] Passage de paramètre entre fenêtres / UserControls. WPF Tutorial MVVM Introduction. Order DBI Component Software Products. Outlook calendar day view sheet as Usercontrol in wpf. List of 3rd-Party Controls.

Agenda

DotNetBar for WPF Free Trial Download. Creating an Outlook Calendar Using WPF (Part 2) Creating an Outlook Calendar using WPF (Part 1) DevExpress. [MVVM] Installation du package MVVM Light depuis NUGET. LINQ à SQL [LINQ to SQL] Procédure pas à pas : affichage de données d'une base de données SQL Server dans un contrôle DataGrid. Thomas Lebrun. DataGrid in WPF. Introduction à WPF. Initiation à WPF. Les meilleurs cours et tutoriels pour apprendre la programmation DotNET. Select Data Using LINQ to SQL Class in WPF. Une visite guidée de WPF - 3e partie (Liaison de données) Introduction%20%C3%A0%20WPF.pdf. Introduction à WPF. Liste de composants WPF (gratuits ou non) Faut-il bruler la pattern MVVM ? C# et WPF : Création d’un calendrier - trailer. Liste de composants WPF (gratuits ou non) Grille de planning sur WPF.

LINQ

Wpf - What does RowDefinition Height="10*" mean in a XAML Grid? Grid Panel. The Grid - Rows & columns - The complete WPF tutorial. Coding spree: Comment créer un contrôle graphique WPF avec Blend. Dotnet-France.com, La communauté .NET francophone ! Using MVVM Light in WPF for Model-View-ViewModel implementation. Procédure pas à pas : mise en route de WPF. WPF – Décorations personnalisées pour les fenêtres WPF. [Débutant WPF] Premier programme pour s'entrainer à WPF. Coding spree: Comment créer un contrôle graphique WPF avec Blend.