Skip to content

Commit cfad4b4

Browse files
WINUI-843320-Prepare-the-GettingStarted-ContentLoading-content-Loading-UG-doument-content-for-SfShimmer-control-in-WinUI
1 parent 2a2ea08 commit cfad4b4

File tree

2 files changed

+68
-16
lines changed

2 files changed

+68
-16
lines changed

winui/Shimmer/Getting-Started.md

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,81 @@ SfShimmer Shimmer = new SfShimmer();
5252

5353
## Loading shimmer content
5454

55-
By disabling the `IsActive` property of `SfShimmer`, shimmer content is loaded.
55+
Disabling the `IsActive` property of SfShimmer displays the content without any shimmer animation. Enabling the `IsActive` property, which defaults to true, activates the shimmer animation in the background. You can change the IsActive property to control how your content is presented.
5656

5757
{% tabs %}
5858
{% highlight xaml %}
5959

60-
<syncfusion:SfShimmer x:Name="shimmer" IsActive="False">
61-
<syncfusion:SfShimmer.Content>
62-
<TextBlock Text="Content is loaded!"/>
63-
</syncfusion:SfShimmer.Content>
64-
</syncfusion:SfShimmer>
60+
<Syncfusion:SfShimmer x:Name="shimmer" Width="400" WaveDuration="3000">
61+
<Syncfusion:SfShimmer.Content>
62+
<StackPanel Orientation="Horizontal">
63+
<Image Source="Assets/Icon.png" Width="130" Height="130"/>
64+
<StackPanel Orientation="Vertical">
65+
<TextBlock Text="Syncfusion provides an ecosystem of compatible developer" FontWeight="SemiLight" FontSize="13" Margin="-10,20,0,0"/>
66+
<TextBlock Text="control suites, embeddable BI platforms, and business software." FontWeight="SemiLight" FontSize="13" Margin="-10,0,0,0" />
67+
<TextBlock Text="We are proud to serve a wide variety of customers, from individual" FontWeight="SemiLight" FontSize="13" Margin="-10,20,0,0" />
68+
<TextBlock Text="developers to Fortune 100 companies." FontWeight="SemiLight" FontSize="13" Margin="-10,0,0,0" />
69+
</StackPanel>
70+
</StackPanel>
71+
</Syncfusion:SfShimmer.Content>
72+
</Syncfusion:SfShimmer>
6573

6674
{% endhighlight %}
6775
{% highlight C# %}
6876

69-
SfShimmer Shimmer = new SfShimmer()
70-
{
71-
IsActive = false,
72-
Content = new TextBlock
73-
{
74-
Text = "Content is loaded!"
75-
}
76-
};
77-
this.Content = Shimmer;
77+
SfShimmer shimmer = new SfShimmer();
78+
shimmer.Name = "shimmer";
79+
shimmer.Width = 400;
80+
shimmer.WaveDuration = 3000;
81+
82+
StackPanel stackPanel = new StackPanel();
83+
stackPanel.Orientation = Orientation.Horizontal;
84+
85+
Image image = new Image();
86+
image.Source = new BitmapImage(new Uri("Assets/Icon.png", UriKind.Relative));
87+
image.Width = 130;
88+
image.Height = 130;
89+
90+
StackPanel textStackPanel = new StackPanel();
91+
textStackPanel.Orientation = Orientation.Vertical;
92+
93+
TextBlock textBlock1 = new TextBlock();
94+
textBlock1.Text = "Syncfusion provides an ecosystem of compatible developer";
95+
textBlock1.FontWeight = FontWeights.SemiLight;
96+
textBlock1.FontSize = 13;
97+
textBlock1.Margin = new Thickness(-10, 20, 0, 0);
98+
99+
TextBlock textBlock2 = new TextBlock();
100+
textBlock2.Text = "control suites, embeddable BI platforms, and business software.";
101+
textBlock2.FontWeight = FontWeights.SemiLight;
102+
textBlock2.FontSize = 13;
103+
textBlock2.Margin = new Thickness(-10, 0, 0, 0);
104+
105+
TextBlock textBlock3 = new TextBlock();
106+
textBlock3.Text = "We are proud to serve a wide variety of customers, from individual";
107+
textBlock3.FontWeight = FontWeights.SemiLight;
108+
textBlock3.FontSize = 13;
109+
textBlock3.Margin = new Thickness(-10, 20, 0, 0);
110+
111+
TextBlock textBlock4 = new TextBlock();
112+
textBlock4.Text = "developers to Fortune 100 companies.";
113+
textBlock4.FontWeight = FontWeights.SemiLight;
114+
textBlock4.FontSize = 13;
115+
textBlock4.Margin = new Thickness(-10, 0, 0, 0);
116+
117+
textStackPanel.Children.Add(textBlock1);
118+
textStackPanel.Children.Add(textBlock2);
119+
textStackPanel.Children.Add(textBlock3);
120+
textStackPanel.Children.Add(textBlock4);
121+
122+
stackPanel.Children.Add(image);
123+
stackPanel.Children.Add(textStackPanel);
124+
125+
shimmer.Content = stackPanel;
126+
127+
this.Content = shimmer;
78128

79129
{% endhighlight %}
80-
{% endtabs %}
130+
{% endtabs %}
131+
132+
![WinUI Shimmer control Content](Shimmer_Images/winui_shimmer_content.gif)
Loading

0 commit comments

Comments
 (0)