StaticResource vs DynamicResource

At this point, you’re probably wondering what the difference is between a static and dynamic resource. The difference is that a static resource grabs the object from the resources collection once. Depending on the type of object (and the way it’s used), any changes you make to that object may be noticed right away.
However, the dynamic resource looks the object up in the resources collection every time it’s needed. That means you could place an entirely new object under the same key, and the dynamic resource would pick up your change.

As a general guideline, use dynamic properties only when you have these conditions:
  • Your resource has properties that depend on system settings (such as the current Windows colors or fonts).
  • You plan to replace your resource objects programmatically.

댓글

이 블로그의 인기 게시물

Oracle NLS_DATE_FORMAT 변경

Stop console process using Ctrl+C.

Alternative to IValueConvert, QuickConverter