-
Notifications
You must be signed in to change notification settings - Fork 177
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
[doc bug]: Incomplete template for Window #1997
Comments
Thank you for reporting this. I'm not sure where the original code is that was used to create these modified templates. As I get notified to these out-of-date templates, I just go in and edit them to put the default template in. |
Yikes. It looks like this template was already "fixed." What OS, Visual Studio version, and .NET Framework version are you using? |
What do you mean by fixed. The documentation page nor the snippet page has changed. The one I pasted in, which I believe I got from Visual Studio directory, also has a trigger that will set the control template "Ǡ" |
When I said fixed, I meant solving the problem of the incomplete templates, which for this specific template was 2 years ago. All of the templates shown seem to have been created over 10 years ago and they provide all sorts of customizations to them. When issues come up with them, I just revert them to what Visual Studio generates when you right-click on a control and ask it to generate a copy. Looking into this one again, I don't see where this trigger came from. When I go in and generate the template now, I get a very simple style without the triggers: <Style x:Key="WindowStyle1" TargetType="{x:Type Window}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Window}">
<ContentPresenter/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style> |
Your changes do not account for the properties of a Window. https://learn.microsoft.com/en-us/dotnet/api/system.windows.window.resizemode?view=netframework-4.8
There is no resize grip to be displayed under any conditions in the control template that you are now showing. The problem with the original documentation was that it was incomplete as it was referring to a resource that was not displayed Ǡ. I have shown you that resource. Feel free to name the resource as you would like ( For the JetSystemColors from Aero just use SystemColors ) |
I have looked at the vs designer code and it looks like it should be reading from the directory Which should be aero2.normalcolor.xaml for windows OS >= Win 8.
|
Type of issue
Other (describe below)
Description
Edit by adegeo to convert the issue to the feedback link on the page
The Trigger below refers to a non existent static resource.
Taken from aero
Page URL
https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/window-styles-and-templates?view=netframeworkdesktop-4.8
Content source URL
https://github.com/dotnet/docs-desktop/blob/main/dotnet-desktop-guide/framework/wpf/controls/window-styles-and-templates.md
Document Version Independent Id
c1f96787-03b0-7740-51fb-9722a9609198
Article author
@adegeo
Metadata
Related Issues
Associated WorkItem - 371157
The text was updated successfully, but these errors were encountered: