Questions tagged [wpf]

Windows Presentation Foundation, or WPF, is a subsystem for rendering user interfaces in Windows-based applications.

Windows Presentation Foundation (WPF, previously known as “Avalon”) is part of the Microsoft .NET Framework used to create rich client user experiences for Windows applications. It is also considered as the successor to

It features a diverse set of controls, layout options, 2D and 3D graphics, media and text handling and enables data binding and style-driven templates.

It uses a combination of XAML, an XML-based markup language, and any of the Common Language Runtime languages to define user interface elements. A fundamental aspect of WPF is to separate the user interface definition from the business logic, which enables developers and designers to work concurrently on a single project much more easily. It enables the users to build a loosely coupled application with the use of data bindings effectively. WPF also moves UI rendering off to the video hardware through the use of . Doing so allows computers to utilize their GPU, which frees the CPU to handle more of the logic-oriented tasks.

WPF runtime libraries are included in all versions of Windows, since Windows Vista and Windows Server 2008.

To learn more, visit the WPF portal on MSDN. See also the Wikipedia entry on WPF.

WPF employs XAML, an XML-based language, to define and link various UI elements. WPF applications can also be deployed as standalone desktop programs, or hosted as an embedded object in a website. WPF aims to unify a number of common user interface elements, such as 2D/3D rendering, fixed and adaptive documents, typography, vector graphics, runtime animation, and pre-rendered media. These elements can then be linked and manipulated based on various events, user interactions, and data bindings.

Microsoft has released six major WPF versions:

  • WPF 4.6 (July 2015)
  • WPF 4.5 (August 2012)
  • WPF 4 (April 2010)
  • WPF 3.5SP1 (Aug 2008)
  • WPF 3.5 (Nov 2007)
  • WPF 3.0 (Nov 2006)

In future, the WPF runtime libraries will be provided by Microsoft as packages known as "App Local" in order for updates to be released independently of .NET Framework releases.

Breaking Changes

On December, 2018 WPF, WinForms and WinUI frameworks became another part of open source community, as announced by Microsoft. WinForms and WinUI are already open, and WPF is starting with System.XAML, and more changes will be announced during the 2019.

Resources

Visual Studio Extensions for WPF Controls

Chat Room

168897 questions
198
votes
15 answers

Any free WPF themes?

I'm not a designer, so I'm looking for some free WPF themes. Any suggestions?
TimothyP
  • 21,178
  • 26
  • 94
  • 142
197
votes
5 answers

How can I open Windows Explorer to a certain directory from within a WPF app?

In a WPF application, when a user clicks on a button I want to open the Windows explorer to a certain directory, how do I do that? I would expect something like this: Windows.OpenExplorer("c:\test");
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
196
votes
19 answers

"Items collection must be empty before using ItemsSource."

I'm trying to get images to display in a WPF ListView styled like a WrapPanel as described in this old ATC Avalon Team article: How to Create a Custom View. When I try to populate the ListView with a LINQ-to-Entities queried collection of ADO.NET…
Zack Peterson
  • 56,055
  • 78
  • 209
  • 280
195
votes
6 answers

How to make overlay control above all other controls?

I need to make a control appear above all other controls, so it will partially overlay them.
user626528
  • 13,999
  • 30
  • 78
  • 146
194
votes
3 answers

WPF text Wrap vs WrapWithOverflow

What's the "conceptual" difference between TextWrapping="Wrap" and TextWrapping="WrapWithOverflow" (e.g. for a TextBox)? In the MSDN page about the class TextBox there is nothing ... Thank you.
Daniele Armanasco
  • 7,289
  • 9
  • 43
  • 55
193
votes
12 answers

Binding to static property

I'm having a hard time binding a simple static string property to a TextBox. Here's the class with the static property: public class VersionManager { private static string filterString; public static string FilterString { get {…
Anthony Brien
  • 6,106
  • 7
  • 43
  • 56
192
votes
4 answers

How can I provide multiple conditions for data trigger in WPF?

How can I provide multiple conditions for data trigger in WPF?
Sumeru Suresh
  • 3,121
  • 5
  • 28
  • 31
192
votes
4 answers

How to use WPF Background Worker

In my application I need to perform a series of initialization steps, these take 7-8 seconds to complete during which my UI becomes unresponsive. To resolve this I perform the initialization in a separate thread: public void Initialization() { …
Eamonn McEvoy
  • 8,876
  • 14
  • 53
  • 83
190
votes
4 answers

Where is the WPF Timer control?

Where can I find a control which is like the C# Timer Control in WPF?
cetin
  • 2,025
  • 4
  • 17
  • 9
190
votes
3 answers

Binding ConverterParameter

Is there a way I could do this in a Style: