dotnet / docs-desktop

This repository contains .NET documentation related to Windows Forms (winforms) and Windows Presentation Foundation (WPF).
Creative Commons Attribution 4.0 International
192 stars 174 forks source link

The code is incomplete, ans cannot be used for trial/Testing, so it is pointless #1132

Open chopperaddict opened 3 years ago

chopperaddict commented 3 years ago

code missing

<RepeatButton Style="{StaticResource MenuScrollButton}"

MenuScrollButton cannot be found .....

Another one 👍 Data="{StaticResource DownArrow}" /> Same error.

So the example is totally unusable for learning how to at least to understand, or at least get thru this nightmare just to style a menu item...


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

adegeo commented 3 years ago

I'll work on adding all the details. I'll just regenerate and paste in the XAML. You can do this yourself by generating a copy of any control's template in Visual Studio through the Document Outline pane. Right-click on the control you want to generate a template for, and then choose create a copy:

image

chopperaddict commented 3 years ago

Thanks for the response, but I did already know that..... I wanted a really full blooded example, so though your documentation would be the place to go. But it didn't work.

I think your docs want updating to at least provide valid code if you make it available for copying??

Best Regards

Ian Turner

On Tue, 3 Aug 2021 at 17:17, Andy (Steve) De George < @.***> wrote:

I'll work on adding all the details. I'll just regenerate and paste in the XAML. You can do this yourself by generating a copy of any control's template in Visual Studio through the Document Outline pane. Right-click on the control you want to generate a template for, and then choose create a copy:

[image: image] https://user-images.githubusercontent.com/67293991/120515616-5179c900-c383-11eb-9e7a-2c99c6b1e8c2.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dotnet/docs-desktop/issues/1132#issuecomment-891981444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETPDC7ZNRSSSGA7UMSZB23T3AJDFANCNFSM5BLIE7YA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

adegeo commented 3 years ago

I suspect all of these WPF .NET Framework reference articles are out of date with all the details. They were written like 10 years ago. Right now our efforts are on porting a lot of this content to .NET 5 in the .NET documentation area. However, since you filed this bug, I'll paste in the latest generated XAML and get the article updated.

adegeo commented 3 years ago

Also, note that these articles don't change aspects of the template, they just show you what the template looks like. You don't get any added benefit copying these "examples." These articles aren't true examples and they don't change the template, they're more reference material. You're better off using the generate template feature of Visual Studio. You'll get the most up-to-date template that way.

We have a generic article that shows you how to change templates, but it doesn't go into detail on all controls: https://docs.microsoft.com/en-us/dotnet/desktop/wpf/controls/how-to-create-apply-template?view=netframeworkdesktop-4.8

chopperaddict commented 3 years ago

All understood Any, and agreed with, but when you are trying to learn this stuff, it often takes loads of "working" examples until the penny drop - for me at least that is very true !!!!

Cheers :-)) Best Regards

Ian Turner

On Tue, 3 Aug 2021 at 18:00, Andy (Steve) De George < @.***> wrote:

Also, note that these articles don't change aspects of the template, they just show you what the template looks like. You don't get any added benefit copying these "examples." These articles aren't true examples and they don't change the template, they're more reference material. You're better off using the generate template feature of Visual Studio. You'll get the most up-to-date template that way.

We have a generic article that shows you how to change templates, but it doesn't go into detail on all controls: https://docs.microsoft.com/en-us/dotnet/desktop/wpf/controls/how-to-create-apply-template?view=netframeworkdesktop-4.8

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dotnet/docs-desktop/issues/1132#issuecomment-892009869, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETPDCY2WUJB3NAWBI3WUZDT3AODXANCNFSM5BLIE7YA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .