Relative Content

Tag Archive for c#wpf

Bind Observable Collection in WPF to MenuItems as Flat list

I’ve been trying to sort this out for a few days now and I’ve hit a wall. I’m trying to bind my collection of Categories to a Menu which then displays each categories list of items in a flat list. How is this possible with Menu/MenuItems?

Manually set display for windows in WPF, and open the windows Maximized

I am looking to programmatically set which display my windows are shown on. This below mostly works…however, it only works if I set the WindowState to Minimized. If it is set to Maximized, it still opens/shows on the main display every time. I even tried setting it to Minimized, and then switching it to Maximized after, it still goes to the main display. Windows Startup Location is set to Manual.