ToolTip 요소(IntelliSense 코드 조각)

코드 조각에 있는 리터럴이나 개체의 예상 값과 사용법을 설명합니다. Visual Studio에서는 코드 조각을 프로젝트에 삽입할 때 이러한 요소를 도구 설명에 표시합니다.

<ToolTip>
    ToolTip description
</ToolTip>

특성 및 요소

다음 단원에서는 특성, 자식 요소 및 부모 요소에 대해 설명합니다.

특성

없음

자식 요소

없음

부모 요소

요소

설명

Literal

편집할 수 있는 코드 조각의 리터럴 필드를 정의합니다.

Object

편집할 수 있는 코드 조각의 개체 필드를 정의합니다.

텍스트 값

텍스트 값이 필요합니다.

이 텍스트는 코드 조각에 있는 개체나 리터럴과 연결되는 ToolTip 설명을 지정합니다.

설명

코드 조각을 삽입하고 나서 마우스를 리터럴이나 개체 위로 이동하면 도구 설명 텍스트가 표시됩니다.

예제

다음 예제에서는 LiteralObject 요소에 대한 ToolTip 요소를 선언하는 방법을 보여 줍니다.

<CodeSnippets xmlns="https://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <!-- Insert Header information here. -->
        </Header>
        <Snippet>
            <Declarations>
                <Literal>
                    <ID>SQL</ID>
                    <ToolTip>Replace with a SQL connection string.</ToolTip>
                    <Default>"SQL connection string"</Default>
                </Literal>
                <Object>
                    <ID>Connection</ID>
                    <Type>System.Data.SqlClient.SqlConnection</Type>
                    <ToolTip>Replace with a connection object in your application.</ToolTip>
                    <Default>dcConnection</Default>
                </Object>
            </Declarations>
            <Code Language="CSharp">
                <!-- Insert code here. -->
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

참고 항목

개념

코드 조각 스키마 참조