# How to Set Default Window Size for a .NET App on First Opening

**URL:** <https://community.interop.io/t/how-to-set-default-window-size-for-a-net-app-on-first-opening/618>\
**Category:** io.Connect Desktop\
**Tags:** FAQs, NET\
**Created:** [July 8, 2026, 11:39am UTC](https://community.interop.io/t/how-to-set-default-window-size-for-a-net-app-on-first-opening/618 "2026-07-08T11:39:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![toni.petrov](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.interop.io/toni.petrov/32/17_2.png) [@toni.petrov](https://community.interop.io/u/toni.petrov)\
**Post date:** [July 8, 2026, 11:39am UTC](https://community.interop.io/t/how-to-set-default-window-size-for-a-net-app-on-first-opening/618/1 "2026-07-08T11:39:41Z")

</div>

When registering .NET applications programmatically with io.Connect Desktop, you can control the initial window size on first launch, while still allowing users to resize the window freely afterward, with their custom sizing preserved for subsequent openings.

## How

Use `WithWindowOptionsModifier` on the `IApplicationDefinitionBuilder` to set the initial screen bounds when registering your app via `RegisterAppFactoryAsync` or `RegisterWPFApp`:

```csharp
IApplicationDefinitionBuilder::WithWindowOptionsModifier(gwo => gwo.WithScreenBounds(...))

```

Once the user manually resizes the window, io.Connect Desktop will preserve the user-defined size on subsequent launches as part of its default layout behavior.

## Notes

- The `WithWindowOptionsModifier` method requires **[io.Connect.NET](http://io.Connect.NET) 1.35.0 or later**.
- If you try setting window bounds inside the `Initialize` method of `Tick42.AppManager.IGlueAppHandle` using `glueWindow.Update(MoveResize(...))`it will also set the window size. But the set size will be applied **at every opening** , not just the first time. Moving the window in the initialize state does not work as the system will place it in the proper position according to the layout (or the default position).
