Skip to content
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

Port and improve WPF controls overview #2011

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

adegeo
Copy link
Contributor

@adegeo adegeo commented Feb 21, 2025

Summary

  • Ported the article
  • Acro'd the article
  • Rewrote portions of it
  • Ported, added to, and modernized the code
  • Added screenshots
  • Need to add VB

Contributes to #1988

@gewarren


Internal previews

📄 File 🔗 Preview link
dotnet-desktop-guide/net/wpf/controls/index.md dotnet-desktop-guide/net/wpf/controls/index

@adegeo adegeo mentioned this pull request Feb 21, 2025
14 tasks
@adegeo adegeo marked this pull request as ready for review February 21, 2025 03:04
@adegeo adegeo requested a review from gewarren February 21, 2025 03:04
@@ -47,6 +47,8 @@ items:
href: windows/how-to-get-set-main-application-window.md
- name: Controls
items:
- name: Overview
href: controls/index.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
href: controls/index.md
href: controls/index.md
displayName: controls

:::code language="csharp" source="./snippets/index/csharp/MainWindow.xaml.cs" id="ExampleAppCode":::
:::code language="vb" source="./snippets/index/vb/MainWindow.xaml.vb" id="ExampleAppCode":::

## Subscribing to Events
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Subscribing to Events
## Subscribe to events


#customer intent: As a developer, I want to understand WPF controls so that I know their capabilities, especially in ways they compare to other desktop technologies.
---
# What are Controls? (WPF .NET)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# What are Controls? (WPF .NET)
# What are controls? (WPF .NET)


:::image type="content" source="./media/index/xaml-example-property.png" alt-text="A screenshot of a WPF app with two text boxes labeled name and address. Two buttons are visible. One button is named 'Reset' and the other 'Submit.' The 'Submit' button has a gradient background that transitions from a blue to a lighter blue.":::

### Creating a Style for a Control
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Creating a Style for a Control
### Create a style for a control


Instead of applying the style to all controls of a specific type, they can also be assigned to specific controls by adding a key to the style in the resource dictionary, and referencing that key in the `Style` property of the control. For more information about styles, see [Styling and Templating](styles-templates-overview.md).

### Creating a ControlTemplate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Creating a ControlTemplate
### Create a ControlTemplate


For more information about how to take advantage of the unique features a template provides, see [Styling and Templating](styles-templates-overview.md).

## Rich Content in Controls
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Rich Content in Controls
## Rich content in controls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants