CanvasSwapChainPanel Class |
Namespace: Microsoft.Graphics.Canvas.UI.Xaml
public sealed class CanvasSwapChainPanel : SwapChainPanel, IAnimationObject, IVisualElement
The CanvasSwapChainPanel type exposes the following members.
Name | Description | |
---|---|---|
CanvasSwapChainPanel | Initializes a new instance of the CanvasSwapChainPanel class. |
Name | Description | |
---|---|---|
RemoveFromVisualTree | Removes the control from the last FrameworkElement it was parented to. |
The size of the swap chain may be different from the control's layout size. In particular, it does not stretch to fill the control. For more information on swap chains, see CanvasSwapChain.
When using CanvasSwapChainPanel from managed code, care must be taken to avoid memory leaks due to reference count cycles. See Avoiding memory leaks for more information.
CanvasSwapChain swapChain = new CanvasSwapChain(new CanvasDevice(), 800, 600); canvasSwapChainPanel.SwapChain = swapChain; using(CanvasDrawingSession ds = swapChain.CreateDrawingSession(Colors.White)) { ds.DrawCircle(400, 300, 100, Colors.Red, 20); } swapChain.Present();