Skip to content

Add DefaultDisplayProperty example to Types.ps1xml #11321

@santisq

Description

@santisq

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."

PowerShell Version

5.1, 7.2, 7.3, 7.4

Summary

Add a basic XML example for DefaultDisplayProperty in about Types.ps1xml doc.

Details

MemberSet section of the doc shows how to add a DefaultDisplayPropertySet but for DefaultDisplayProperty it isn't as straight forward, the node has to be in a NoteProperty and this isn't entirely clear. There are also no examples that can be easily found by googling (tbh wouldn't have found a way if @SeeminglyScience didn't help 😅).

Proposing to add this simple example:

<Types>
  <Type>
    <Name>SomeNamespace.SomeType</Name>
    <Members>
      <MemberSet>
        <Name>PSStandardMembers</Name>
        <Members>
          <NoteProperty>
            <Name>DefaultDisplayProperty</Name>
            <Value>SomePropertyName</Value>
          </NoteProperty>
        </Members>
      </MemberSet>
    </Members>
  </Type>
</Types>

Proposed Content Type

Other / Unknown

Proposed Title

No response

Related Articles

Metadata

Metadata

Labels

area-aboutArea - About_ topicsissue-doc-ideaIssue - request for new content

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions