Partilhar via


Changes around resources

We made a couple changes to how resources (FrameworkElementaryresources) work in the last CTP, they've kind of flown under the radar so I wanted to call them out:

  • FindResource() throws an exception if the resources not found; we introduced a method TryFindResource which returns null if the resource isn't found
  • {DynamicResource} used to throw an exception if the resource was not found, but we found a number of legitimate cases where the resource was unavailable at first but would show up later. So we changed DynamicResource to return null if the resource can't be found, and do like data binding and print a message to the debug window when this happens.
  • If you have two merged dictionaries, WPF used to complain if those dictionaries had a key in common. Now that's okay, and the key from the last dictionary wins, which is useful for creating dictionaries that augment and modify one another.