New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TitleBar non-responsive in Powershell when UseModernWindowStyle is set to "True" #138
Comments
This is indeed a problem. I'll look into it. |
Should be fixed in the latest source. Until a new version is released, you can work around this issue by setting WindowChrome explicitly: <Window
...
ui:WindowHelper.UseModernWindowStyle="True">
<Window.Resources>
...
</Window.Resources>
<WindowChrome.WindowChrome>
<WindowChrome
CaptionHeight="32"
CornerRadius="0"
GlassFrameThickness="0,1,0,0"
UseAeroCaptionButtons="False" />
</WindowChrome.WindowChrome>
...
</Window> |
@IvanDrag0 Sorry to hijack this thread - but I've been trying to get ModernWpf to work properly in PowerShell all day. Is there any way you can post your full source code for the example application you show above? I managed to cobble together a form: But the styling doesn't at all match ModernWpf's design. Here's the ps1:
And here's the XAML:
I couldn't get your XAML to work. This is what happens when I try your XAML: Any help at all would be amazing! Thanks. |
@visusys My XAML doesn't work for you because you can't import the XAML directly into PowerShell. There's some "cleanup" that you have to do. Take a look at this example and this one. Also, you don't need to use the The reason your XAML is not working is probably because you're missing the resource dictionaries (the Hope this helps! |
@IvanDrag0 Thanks SO much for the guidance and the links. I've gone through both of them thoroughly and unfortunately I still think I'm missing something crucial. I feel like I've tried everything. This is what I have sofar: https://gist.github.com/visusys/64570f64e5bfccb75ddb34ad82387d16 But I'm getting a lot of errors:
and: I'm trying to follow this guide.
And a whole bunch of other various tweaks to no avail. Would it all be possible for you to drop a working example .ps1 in a gist and link me? I've been trying to get this working for two days straight now and I'm totally burnt out and frustrated. Thanks again for the help! |
@visusys Here's the XAML I used:
Here's the Powershell code:
|
I have the following WPF GUI I've made for Powershell using the ModernWpf library:
When I set the UseModernWindowStyle line to "True", the GUI looks and behaves as expected, however, the TitleBar is not responding to movement and/or maximizing the window by double clicking on it. The minimize, maximize, and close buttons work as expected. Also, the icon in the top left (next to the title) disappears.
When I set the line to "False", the window looks and behaves as expected (with the icon on the top left showing up correctly), however, there's a gap between the TitleBar and the NavigationView back button.
I tried this on the Powershell example in the repo and I'm getting the same results (so I'm not sure if it's an issue with the code or with my computer).
The text was updated successfully, but these errors were encountered: