public void ChangeKeyPathOfObjectToValue(NSObject o) { NSString keyPath = ((NSArray)o).GetItem <NSString>(0); NSObject obj = ((NSArray)o).GetItem <NSObject>(1); NSObject newValue = ((NSArray)o).GetItem <NSObject>(2); // setValue:forKeyPath: will cause the key-value observing method // to be called, which takes care of the undo stuff if (newValue.DebugDescription != "<null>") { obj.SetValueForKeyPath(newValue, keyPath); } else { obj.SetValueForKeyPath(new NSString("New Person"), keyPath); } }
public static void SetStyleMode(NSObject obj, PXStylingMode mode) { var modeNum = new NSNumber((int)mode); obj.SetValueForKeyPath(modeNum, new NSString("styleMode")); }
public static void SetStyleCSS(NSObject obj, string id) { obj.SetValueForKeyPath(new NSString(id), new NSString("styleCSS")); }
public static void SetStyleMode(NSObject obj, PXStylingMode mode) { var modeNum = new NSNumber ((int)mode); obj.SetValueForKeyPath (modeNum, new NSString ("styleMode")); }
public static void SetStyleId(NSObject obj, string id) { obj.SetValueForKeyPath (new NSString (id), new NSString ("styleId")); }