Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7934365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:37:39+00:00 2026-06-03T21:37:39+00:00

I am trying to figure out how does wpf manage static resources at the

  • 0

I am trying to figure out how does wpf manage static resources at the background. For example, if i get a static resource at the code behind and set it to null or define a new object for it, changes are not reflected. But if i get static resource and change a property of it, changes are reflacted. How does wpf understands if i changed a property or set object referance and behaves this way?

Thanks for your helps.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:37:40+00:00Added an answer on June 3, 2026 at 9:37 pm

    Actually, this is just the standard way how the objects behave in .NET. There is some object somewhere. You get a reference to an object, and if you set your local reference to null, any other object holding the reference will not notice that — after all, they have their own reference!

    But if you change something that is “pointed to” by the reference, you change now the actual data, so everyone sees it!

    Example:

    class MyObject { public int i; }
    
    MyObject ref1 = new MyObject() { i = 100 };
    MyObject ref2 = ref1; // ref2 is just another reference to the object
    ref1 = null;
    Console.WriteLine(ref2.i); // prints 100, the object is still alive
    ref1 = ref2;
    ref1.i = 50;
    Console.WriteLine(ref2.i); // prints 50, the object is changed
    

    The same way it goes with static resources: you get a reference to the object, so if you null out your reference, others won’t mention it: they just have another reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out what the following code in C does? ((void(*)())buf)(); where
I'm trying to figure out what this piece of code does: std::vector<std::vector<bool> > visited(rows,
I'm trying to figure out why the control does not honor ZIndex. Example 1
This isn't my code; I am trying to figure out what exactly this does.
I'm trying to figure out if g++ -fsyntax-only does only syntax checking or if
I am trying to figure out why my $.getJSON method does not seem to
Specifically, I'm trying to figure out if it's possible to generate SQL that does
Trying to figure out the best way to set up collection lists for users
Trying to figure out this pseudo code. The following is assumed.... I can only
I am trying to figure out how exactly does treesort from here work (I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.