I am trying to keep the number of appearances down for performance reasons.
I am doing this with a function that creates the key which is a string with the hex value of color.
I tried then using that key to search for the existance of the appearance using Contains. Which is failing, so I tried creating a class that extends IKeyedSubObject:
public class FxAppearanceFinder : IKeyedSubObject {
private string _Key;
_Key = key;
}
get { return _Key; }
public void OnRemovedFromCollection(KeyedSubObjectsCollectionBase primaryCollection) {
#endregion
I pass this the key to the ctor of the class.
string s = CalcApptAppearKey(appt);
Infragistics.Win.Appearance appear = null;
appear = _CalInfo.Appearances[s];
This does not return the Appearance.
Can you help me with this?
Thanks,
Bob
Thanks for the help!
The 'Contains' method takes an instance reference, you want to use the Exists method.