Getting Started with WinUI Shimmer
18 Nov 20181 minute to read
This section explains how to get started with the WinUI Shimmer control in a WinUI application and covers the basic steps required to add and use the control.
Creating an application with the WinUI Shimmer control
- Create a WinUI 3 desktop application in C#.
- Install the Syncfusion.Core.WinUI NuGet package.
- Import the Syncfusion.UI.Xaml.Core namespace in XAML or C#.
- Add and initialize the SfShimmer control.
Initializing Shimmer control
You can add the SfShimmer control in XAML or create an instance of it programmatically in code-behind.
<Window
x:Class="GettingStarted.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:GettingStarted"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:syncfusion="using:Syncfusion.UI.Xaml.Core"
mc:Ignorable="d">
<Grid>
<syncfusion:SfShimmer />
</Grid>
</Window>// Creating an instance of the Shimmer control.
using Microsoft.UI.Xaml;
using Syncfusion.UI.Xaml.Core;
namespace GettingStarted
{
public sealed partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
SfShimmer shimmer = new SfShimmer();
this.Content = shimmer;
}
}
}