Descreve como usar um controle WPF de terceiros em seu aplicativo WPF.

The WPF Designer for Visual Studio makes it easy to use third-party controls in your WPF applications. This topic shows how to use a WPF control which is deployed in a separate assembly.

ObservaçãoObservação

Caixas de diálogo e comandos de menu que você vê podem diferir das descritas na Help dependendo das suas configurações ativas ou edição. Para alterar as configurações, escolha Import and Export Settings sobre o Ferramentas menu. For more information, see Trabalhando com configurações.

To use a third-party WPF control in your application

  1. Open the XAML file for your project's main window in the WPF Designer. Por exemplo, você pode em aberto MainWindow. XAML ou UserControl1.xaml.

  2. Right-click the Toolbox and select Chose Items from the shortcut menu.

    The Choose Toolbox Items dialog box opens.

  3. Click the WPF Components tab.

  4. In the list, locate the control you wish to use.

  5. If the control you want to use does not appear in the list, click the Browse button. In the Open dialog box, navigate to the assembly which contains the control you want to use. Select the assembly and click Open.

    The control appears in the Choose Toolbox Items dialog box.

  6. Ensure that the check box next to the control is checked, and then click the OK button.

    The selected control appears in the Toolbox.

  7. From the Toolbox, drag the control onto the design surface.

    The selected control appears on the design surface. Also, the control's assembly is added as a project reference, and a namespace mapping is added to the open XAML file.

Consulte também

Tarefas

Como: Importar um namespace em XAML

Como: Adicionar itens à caixa de ferramentas

Referência

Componentes do WPF de tabulação, escolha a caixa de diálogo de itens da caixa de ferramentas

Conceitos

Referências do projeto

Outros recursos

Trabalhar com controles no criador de WPF