glue42

How to make a window always appear at specified location?


I created the json file for my WPF C# exe in the config folder. On every subsequent launch it appears in the place I last moved the window.

I want it to always appear at [367, 120].

Is this possible?

Here is my config:

{
  "title": "IssueTracker",
  "type": "exe",
  "name": "IssueTracker",
  "details": {
    "path": "C:\\evals\\glue\\IssueTracker\\IssueTracker\\bin\\Debug",
    "command": "IssueTracker.exe",
    "parameters": "",
    "top": 120,
    "left": 367,
    "width": 1000,
    "height": 400
  }
}

Solution

  • There is a top level property ignoreSaveOnClose, which you can set to true.

    Seems it slipped from the documentation.

    Here's how your config would look like:

    {
      "title": "IssueTracker",
      "type": "exe",
      "name": "IssueTracker",
      "ignoreSaveOnClose": true,
      "details": {
        "path": "C:\\evals\\glue\\IssueTracker\\IssueTracker\\bin\\Debug",
        "command": "IssueTracker.exe",
        "parameters": "",
        "top": 120,
        "left": 367,
        "width": 1000,
        "height": 400
      }
    }