--- title: "How to: Seek a Storyboard Synchronously" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "seeking Storyboards synchronously [WPF]" - "Storyboards [WPF], seeking synchronously" ms.assetid: 03e06271-a946-4810-88ea-3fb4cfa9e0f1 --- # How to: Seek a Storyboard Synchronously The following example shows how to use the method of a to seek to any position in a storyboard animation synchronously. ## Example The following is the XAML markup for the sample. [!code-xaml[SeekStoryboard_snip#SeekStoryboardSynchronouslyExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/SeekStoryboard_snip/CSharp/SeekStoryboardSynchronouslyExample.xaml#seekstoryboardsynchronouslyexamplewholepage)] ## Example The following is the code used with the XAML code above. [!code-csharp[SeekStoryboard_snip#SeekStoryboardSynchronouslyCodeBehindExampleWholePage](~/samples/snippets/csharp/VS_Snippets_Wpf/SeekStoryboard_snip/CSharp/SeekStoryboardSynchronouslyExample.xaml.cs#seekstoryboardsynchronouslycodebehindexamplewholepage)] [!code-vb[SeekStoryboard_snip#SeekStoryboardSynchronouslyCodeBehindExampleWholePage](~/samples/snippets/visualbasic/VS_Snippets_Wpf/SeekStoryboard_snip/VisualBasic/SeekStoryboardSynchronouslyExample.xaml.vb#seekstoryboardsynchronouslycodebehindexamplewholepage)]