| WPF-Question-Answers-81-90 | WPF-Question-Answers-101-110 | |
WPF (Windows Presentation Foundation) Question Answers - 91 to 100 |
Visual—The base class for all objects that have their own 2D visual representation.
Visual3D—The base class for all objects that have their own 3D visual representation.
The layout system completes two passes for each child member in a collection: a measure pass, and an arrange pass. Each child object provides its own overridden implementation of the Measure and Arrange methods in order to provide its own specific layout behaviour. At its simplest, layout is a recursive system that leads to an element being sized, positioned, and drawn onscreen.
A WPF application must start in single-threaded apartment thread. STA have a message queue to synchronize method calls within his apartment. As well as other threads outside the apartment can't update the objects directly. They must place their method call into the message queue to update the objects in STA.
Dispatcher owns the message queue for the STA thread.
When you execute a WPF application, it automatically create a new Dispatcher object and calls its Run method. Run method is used for initializing the message queue.
When WPF application starts, it creates two threads:
- Render thread
- UI thread
UI thread is responsible all the user inputs, handle events, paints screen and run the application code. Render threads runs in the background and used for render the WPF screen.
WPF Dispatcher is associated with the UI thread. The UI thread queues methods call inside the Dispatcher object. Whenever your changes the screen or any event executes, or call a method in the code-behind all this happen in the UI thread and UI thread queue the called method into the Dispatcher queue. Dispatcher execute its message queue into the synchronous order.
In WPF Globalization is the design and development of applications that perform in multiple locations. For example, globalization supports localized user interfaces and regional data for users in different cultures. WPF provides globalized design features, including automatic layout, satellite assemblies, and localized attributes and commenting.
WPF stands for Windows Presentation Foundation. It is an application programming Interface for developing rich UI on Windows. WPF is introduced in .NET 3.0. By the use of WPF we can create two and three dimensional graphics, animations etc.
XAML, which stands for eXtensible Application Markup Language, is Microsoft's variant of XML for describing a GUI.
XAML (pronounced as Zammel) is a declarative XML-based language by which you can define object and properties in XML. XAML document is loaded by a XAML parser. XAML parser instantiates objects and set there properties. XAML describes objects, properties and there relation in between them. Using XAML, you can create any kind of objects that means graphical or non-graphical.
XAML is the language behind the visual presentation of an application that you develop in Microsoft Expression Blend, just as HTML is the language behind the visual presentation of a Web page. Creating an application in Expression Blend means writing XAML code, either by hand or visually by working in the Design view of Expression Blend.
xmlns is an XML, not necessarily XAML construct, which defines a namespace in which to resolve xml element names. Because it is defined without a qualifier, it is defining the default namespace by which an XML element name should be resolved.
In XAML you usually see the following entry. It defines the default namespace to be essentially WPF and all XML element names are hence resolved as WPF elements.
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
It's also common to see non-default namespaces such as the following.
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
This defines a qualified namespace for XAML specific elements.
Namespaces needs to be referenced:
1) PresentationCore.dll
2) PresentationFramework.dll
3) UIAutomationProvider.dll
4) UIAutomationTypes.dll
5) WindowsBase.dll
A target property must be a dependency property. Your source can be any CLR object or XML data.
X:Name is used to avoid the ambiguous. Since the value of an x:Name directive usage must be unique within a XAML namescope. Name is a shorthand for x:Name.
| WPF-Question-Answers-81-90 | WPF-Question-Answers-101-110 | |