Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Which Two types of Logical Resources available in WPF?

- StaticResource and Dynamic Resource- StaticResource and CompileResource- WPF does not support Logical Resources- None of the above

user-image
Question ajoutée par Mohannad Bakbouk , Full Stack Web Developer , Almohtaseb
Date de publication: 2016/10/19
Mohamed Ahmed Mansour
par Mohamed Ahmed Mansour , Technical Director & Implementation Head , United Quality Information Systems

  • Logical resources are of two types :

    1) StaticResources 

       * StaticResource is applied only once (first time when it is used).

      * StaticResource has lesser overhead as it is applied only once during the runtime of the       application.

      * StaticResources always get loaded the first time window/page is loaded irrespective of       its use during start up.

      * StaticResources can be used for DependencyProperty as well as normal .net property.

      * StaticResources has to be defined before it is used. Hence, StaticResources can not be      forward referenced.

    2) DynamicResources

        * DynamicResource is applied every time when resource changes e.g. system colors can be         changed using control panel. So if system colors has been used as resource, than update is       required. DynamicResource will take care of such change in resource.

                 * DynamicResource has more overhead as it is applied whenever the resource value                  changes. In order to do this, DynamicResource has to keep tracking about the                        changes in the resource during runtime also.

             * DynamicResources are not loaded until it is actually used. So this results in better                 load time.

            * DynamicResource can only be used for DependencyProperty.

            * DynamicResources can use the forward references.

staticalresources and dynamic resources

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?