-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
MetroWindow v0.12.0.0 should not default to transparent #961
Comments
The reason why |
By default the window is transparent and therefore has no border let alone a glow! |
Amrykid - "The reason why AllowsTransparency is set to true is because for some odd reason, the glowing border effect requires it. It's default." Incorrect. This code will correctly display a v12 window as per v10. i.e. metro style; non-transparent; saves window position; and has a glowing border. <Controls:MetroWindow x:Class="MetroTest1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:Behaviours="clr-namespace:MahApps.Metro.Behaviours;assembly=MahApps.Metro"
Title="MainWindow" Height="350" Width="525"
AllowsTransparency="False"
SaveWindowPosition="True">
<i:Interaction.Behaviors>
<Behaviours:BorderlessWindowBehavior AllowsTransparency="False"
EnableDWMDropShadow="True" />
<Behaviours:WindowsSettingBehaviour/>
</i:Interaction.Behaviors>
<Grid>
<Button Content="Button"
HorizontalAlignment="Left"
Margin="220,28,0,0"
VerticalAlignment="Top"
Width="75" />
</Grid>
</Controls:MetroWindow> |
The glowing border is coloured, such as seen here:
The reason your window is transparent is because you did not merge the resources, please refer to the following webpage to learn the basics: |
@100GPing100 beat me to it. Off-topic: Please surround your code with ```s. |
I am well aware of the basics thanks. Compare these v.10 and v.12 MahApps Metro applications and the default window border shadow. v10 (TOR) shows out of the box border shadow on an inactive window. I find the v12 breaks much including WinForm control hosting as mentioned on the FAQ, which only causes the window position save bug I reported elsewhere. |
Because of the switch (about a year ago) to the glow border which needs We are aware of the breaking changes but we didn't make it to the 1.0 mark yet. If we have to break things, it's better for us to do it now. |
Not at the extent when a change to allow for a glowing coloured border (when the old v0.10 one was arguably fine) breaks say WinForm hosting. Why are you pushing the glow border and therefore transparency to be a 1st-class citizen? One wonders just how frequency one would want to have a nice shade of blue border on an application window. I consider being able to host Microsoft's .NET built-in Chart control from System.Windows.Forms.DataVisualization.Charting in a WPF app easily to be considerably more important than a border that may not be following the current Windows colour scheme. Ideally one should be able to just plop such things onto a window instead of having to either turn off MahApp features or include new code compared to v0.10. Would you consider including the following on your Basics screen at least? // add to your namespace includes
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:Behaviours="clr-namespace:MahApps.Metro.Behaviours;assembly=MahApps.Metro"
.
.
.
<i:Interaction.Behaviors>
<Behaviours:BorderlessWindowBehavior AllowsTransparency="False" />
<Behaviours:WindowsSettingBehaviour/>
</i:Interaction.Behaviors> I do think you guys are doing a tremendous job but I question the priority of glowing borders and their cascading dependence on transparency. |
@MickyD this is an odd discussion, because with your shown changes, you can do what you want... and yes, this is the solution: https://github.com/MahApps/MahApps.Metro/wiki/FAQ#wiki-1-why-is-so-and-so-winforms-control-invisible-or-not-rendering-why-the-webbrowser-or-other-control-covering-my-flyout-or-another-control-airspace |
@MickyD I have used this: <i:Interaction.Behaviors>
<behaviours:BorderlessWindowBehavior AllowsTransparency="False" EnableDWMDropShadow="False"/>
<behaviours:WindowsSettingBehaviour/>
</i:Interaction.Behaviors> Together with the |
@punker76 What? That I'm voicing concerns about the Project's recent lessor backwards compatibility or how documentation could be improved. Such arrogance. At work we only use open source if the project has a proven history of non-breaking changes; is stable; that the source code is available; and is supported by a lively community. As Principal Developer, your project no longer has my vote. |
@100GPing100 yes thanks but I was already doing that. However, as per the old versions, we should not need to. |
You do have a point regarding the default value of |
Thanks @100GPing100 |
By default, MetroWindows in v12 without any reference to MahApps behaviours seem to be transparent by default and is confirmed by your FAQ here -
https://github.com/MahApps/MahApps.Metro/wiki/FAQ
Why on earth did you guys do this? I've not seen any other API on any platform do this. Yes I
e.g. the following code results in a transparent window
I can fix it by performing this new v12 step: (but why should I?)
MOD EDIT: Please surround your code in ```s.
The text was updated successfully, but these errors were encountered: