WPF - Architecture

SINGH Amit 21 Reputation points
2021-09-15T06:52:59.413+00:00

Hi Team,

I have read in the wpf architecture post, stating that "Most objects in WPF derive from DispatcherObject"

https://learn.microsoft.com/en-us/dotnet/desktop/wpf/advanced/wpf-architecture?view=netframeworkdesktop-4.8

It is most of the objects, means not all objects , so which/what kind of objects will not use the DispatcherObject.

Thanks
Amit Singh

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,699 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
778 questions
0 comments No comments
{count} votes

Accepted answer
  1. Hui Liu-MSFT 47,096 Reputation points Microsoft Vendor
    2021-09-15T09:08:55.357+00:00

    You could find objects that do not inherit from DispatcherObject here. Such as DispatcherEventArgs, DispatcherExtensions, Dispatcher, etc.
    Update:
    The following figure shows some of the main classes in the framework of the WPF class hierarchy (not all classes are included), which is helpful for a comprehensive understanding of the class hierarchy. The Brushes class in PresentationCore does not use DispatcherObject. It Implements a set of predefined SolidColorBrush objects.
    132981-2.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Castorix31 82,501 Reputation points
    2021-09-16T13:26:31.08+00:00

    It is most of the objects, means not all objects , so which/what kind of objects will not use the DispatcherObject.

    You can see the Hierarchy, from WPF Dispatcher - Introduction and How to use? :

    or from "Windows Presentation Foundation Unleashed" :

    03fig09.jpg

    0 comments No comments