Search code examples
xcodevisual-studio-mac

How Do I Modify an Attribute in XIB from C# Code


I have the following code in a HelpWindow.xib file:

<string key="NSWindowTitle">HardCodedValue Help</string>

I want to provide a variable value rather than HardCodedValue.

How do I accomplish this from HelpWindowController.cs or HelpWindow.cs, or am I looking in the wrong place?


Solution

  • I was able to accomplish this in HelpWindowController.cs by adding the following code:

    public override void WindowDidLoad()
    {
        base.WindowDidLoad();
        Window.Title = "My New Title";
    }