--- title: "How to: Wrap a Border Around the Content of a Canvas" ms.date: "03/30/2017" helpviewer_keywords: - "controls [WPF], Canvas" - "controls [WPF], Border" - "Canvas control [WPF], wrapping with Border" - "Border control [WPF], wrapping Canvas" ms.assetid: caf0404f-f4e7-484f-9928-5dae1238d8ef --- # How to: Wrap a Border Around the Content of a Canvas This example shows how to wrap a element with a . ## Example The following example shows how to display `Hello World!` inside a element. The element is wrapped by a element so that a border outlines the element. [!code-xaml[CanvasHelloWorldBorder#1](~/samples/snippets/csharp/VS_Snippets_Wpf/CanvasHelloWorldBorder/CS/default.xaml#1)] ## See also - - - [Panels Overview](panels-overview.md)