Skip to content

Commit 85c286e

Browse files
committed
Update InfoBadge
1 parent 4224ee7 commit 85c286e

File tree

3 files changed

+53
-18
lines changed

3 files changed

+53
-18
lines changed

dev/DevWinUI.Controls/Themes/Generic.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,13 +847,13 @@ Themes\Styles\Win2D\Watermark.xaml
847847
<local:StringToStyleConverter x:Key="StringToStyleConverter" />
848848
<local:DoubleToVisibilityConverter x:Name="DoubleToVisibilityConverter" FalseValue="Collapsed" GreaterThan="0" TrueValue="Visible" />
849849
<Style x:Key="StringInfoBadgeStyle" TargetType="InfoBadge">
850-
<Setter Property="Padding" Value="5,1,5,2" />
850+
<Setter Property="Padding" Value="6,1,6,2" />
851851
<Setter Property="Tag" Value="NEW" />
852852
<Setter Property="Template">
853853
<Setter.Value>
854854
<ControlTemplate TargetType="InfoBadge">
855855
<Border x:Name="RootGrid" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.InfoBadgeCornerRadius}">
856-
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="10" Text="{TemplateBinding Tag}" />
856+
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="10" Text="{TemplateBinding Tag}" TextWrapping="NoWrap" />
857857
</Border>
858858
</ControlTemplate>
859859
</Setter.Value>

dev/DevWinUI.Controls/Themes/Styles/CommonStyles/InfoBadge.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
44
<Style x:Key="StringInfoBadgeStyle" TargetType="InfoBadge">
5-
<Setter Property="Padding" Value="5,1,5,2" />
5+
<Setter Property="Padding" Value="6,1,6,2" />
66
<Setter Property="Tag" Value="NEW" />
77
<Setter Property="Template">
88
<Setter.Value>
@@ -14,7 +14,8 @@
1414
<TextBlock HorizontalAlignment="Center"
1515
VerticalAlignment="Center"
1616
FontSize="10"
17-
Text="{TemplateBinding Tag}" />
17+
Text="{TemplateBinding Tag}"
18+
TextWrapping="NoWrap" />
1819
</Border>
1920
</ControlTemplate>
2021
</Setter.Value>

dev/DevWinUI.Gallery/Assets/NavViewMenu/AppData.json

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,32 @@
2424
"UniqueId": "DevWinUIGallery.Views.MenuFlyoutSecondaryMenuPage",
2525
"Title": "MenuFlyout Attach",
2626
"IsNew": true,
27+
"DataInfoBadge": {
28+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
29+
"InfoBadgeValue": "New "
30+
},
2731
"Subtitle": "Provides attached properties and behavior extensions for to support a customizable secondary menu section.",
2832
"ImagePath": "ms-appx:///Assets/Fluent/CommandBarFlyout.png"
2933
},
3034
{
3135
"UniqueId": "DevWinUIGallery.Views.SunTimesHelperPage",
3236
"Title": "SunTimes Helper",
3337
"IsNew": true,
38+
"DataInfoBadge": {
39+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
40+
"InfoBadgeValue": "New "
41+
},
3442
"Subtitle": "A helper class for calculating sunrise and sunset",
3543
"ImagePath": "ms-appx:///Assets/Fluent/Sunny.png"
3644
},
3745
{
3846
"UniqueId": "DevWinUIGallery.Views.SystemTrayIconPage",
3947
"Title": "SystemTrayIcon",
4048
"IsNew": true,
49+
"DataInfoBadge": {
50+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
51+
"InfoBadgeValue": "New "
52+
},
4153
"Subtitle": "SystemTrayIcon is a class that manages an application’s icon in the Windows system tray. It allows showing an icon, setting a tooltip, handling click events, and displaying a context menu directly from the tray area.",
4254
"ImagePath": "ms-appx:///Assets/Fluent/MenuFlyout.png"
4355
},
@@ -51,14 +63,12 @@
5163
"UniqueId": "DevWinUIGallery.Views.WindowedContentDialogPage",
5264
"Title": "Windowed Content Dialog",
5365
"Subtitle": "A dialog control that behaves like ContentDialog but opens in its own window",
54-
"IsNew": true,
5566
"ImagePath": "ms-appx:///Assets/Fluent/ContentDialog.png"
5667
},
5768
{
5869
"UniqueId": "DevWinUIGallery.Views.MessageBoxPage",
5970
"Title": "MessageBox",
6071
"Subtitle": "A simple dialog for displaying messages and prompts with customizable buttons and icons, commonly used for alerts, confirmations, and quick user decisions.",
61-
"IsNew": true,
6272
"ImagePath": "ms-appx:///Assets/Fluent/ContentDialog.png"
6373
},
6474
{
@@ -166,104 +176,119 @@
166176
"Title": "Looping List",
167177
"Subtitle": "An infinitely scrolling selector displayed in a flyout.",
168178
"IsNew": true,
179+
"DataInfoBadge": {
180+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
181+
"InfoBadgeValue": "New "
182+
},
169183
"ImagePath": "ms-appx:///Assets/Fluent/TimePicker.png"
170184
},
171185
{
172186
"UniqueId": "DevWinUIGallery.Views.LoopingSelectorPage",
173187
"Title": "Looping Selector",
174188
"Subtitle": "An infinitely scrolling selection control.",
175189
"IsNew": true,
190+
"DataInfoBadge": {
191+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
192+
"InfoBadgeValue": "New "
193+
},
176194
"ImagePath": "ms-appx:///Assets/Fluent/ListBox.png"
177195
},
178196
{
179197
"UniqueId": "DevWinUIGallery.Views.SegmentedSliderPage",
180198
"Title": "Segmented Slider",
181199
"Subtitle": "Slider control that divides its track into multiple visual segments. Each segment can represent a specific range, time span, or category, with individual fill states and labels.",
182200
"IsNew": true,
201+
"DataInfoBadge": {
202+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
203+
"InfoBadgeValue": "New "
204+
},
183205
"ImagePath": "ms-appx:///Assets/Fluent/Slider.png"
184206
},
185207
{
186208
"UniqueId": "DevWinUIGallery.Views.TimelinePage",
187209
"Title": "Timeline",
188210
"Subtitle": "A visual control to display a day’s time range with key points like StartTime, EndTime, Sunrise, and Sunset.",
189211
"IsNew": true,
212+
"DataInfoBadge": {
213+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
214+
"InfoBadgeValue": "New "
215+
},
190216
"ImagePath": "ms-appx:///Assets/Fluent/Line.png"
191217
},
192218
{
193219
"UniqueId": "DevWinUIGallery.Views.WanderingParticlesPage",
194220
"Title": "Wandering Particles",
195221
"Subtitle": "A visual effect that generates particles moving in random, flowing paths, creating a dynamic and wandering animation.",
196222
"IsNew": true,
223+
"DataInfoBadge": {
224+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
225+
"InfoBadgeValue": "New "
226+
},
197227
"ImagePath": "ms-appx:///Assets/Fluent/Particle.png"
198228
},
199229
{
200230
"UniqueId": "DevWinUIGallery.Views.SnowFlakeEffectPage",
201231
"Title": "SnowFlake Effect",
202232
"Subtitle": "A visual effect that simulates falling snowflakes, with customizable particle count.",
203233
"IsNew": true,
234+
"DataInfoBadge": {
235+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
236+
"InfoBadgeValue": "New"
237+
},
204238
"ImagePath": "ms-appx:///Assets/Fluent/Snowflake.png"
205239
},
206240
{
207241
"UniqueId": "DevWinUIGallery.Views.FlipCardsPage",
208242
"Title": "Flip Cards",
209243
"Subtitle": "A container of multiple FlipBlocks to show time, date, or multi-digit values with dynamic flipping animations.",
210-
"IsNew": true,
211244
"ImagePath": "ms-appx:///Assets/Fluent/GridSplitter.png"
212245
},
213246
{
214247
"UniqueId": "DevWinUIGallery.Views.FlipBlockPage",
215248
"Title": "Flip Block",
216249
"Subtitle": "A single animated panel that “flips” to display a number or character with smooth transitions",
217-
"IsNew": true,
218250
"ImagePath": "ms-appx:///Assets/Fluent/ContentSizer.png"
219251
},
220252
{
221253
"UniqueId": "DevWinUIGallery.Views.HomePageHeaderPage",
222254
"Title": "Home Page Header",
223255
"Subtitle": "A control for displaying the main header section of a home page, typically including title, subtitle, and Image.",
224-
"IsNew": true,
225256
"ImagePath": "ms-appx:///Assets/Fluent/CommandBarFlyout.png"
226257
},
227258
{
228259
"UniqueId": "DevWinUIGallery.Views.HeaderTilePage",
229260
"Title": "Header Tile",
230261
"Subtitle": "A UI element used to display a compact, interactive header block, often combining an icon, title, and description for quick access or navigation.",
231-
"IsNew": true,
232262
"ImagePath": "ms-appx:///Assets/Fluent/RevealFocus.png"
233263
},
234264
{
235265
"UniqueId": "DevWinUIGallery.Views.SegmentCharPage",
236266
"Title": "Segment Char",
237267
"Subtitle": "A base class representing a digital display character, typically used in custom controls to render segments for numbers or letters (like SixteenSegmentChar, FourteenSegmentChar, MatrixSegmentChar)",
238-
"IsNew": true,
239268
"ImagePath": "ms-appx:///Assets/Fluent/TextBlock.png"
240269
},
241270
{
242271
"UniqueId": "DevWinUIGallery.Views.DigitalSegmentPage",
243272
"Title": "Digital Segment",
244273
"Subtitle": "A digital segment is a visual element that represents a portion of a character in a segmented display.",
245-
"IsNew": true,
246274
"ImagePath": "ms-appx:///Assets/Fluent/TextBlock.png"
247275
},
248276
{
249277
"UniqueId": "DevWinUIGallery.Views.CheckUpdateControlPage",
250278
"Title": "CheckUpdateControl",
251279
"Subtitle": "A control that checks for software updates and notifies the user",
252-
"IsNew": true,
253280
"ImagePath": "ms-appx:///Assets/Fluent/update.png"
254281
},
255282
{
256283
"UniqueId": "DevWinUIGallery.Views.OutOfBoxPagePage",
257284
"Title": "OutOfBoxPage",
258285
"Subtitle": "A page displayed during the initial setup or first launch of an application, guiding users through onboarding, configuration, or feature introduction.",
259-
"IsNew": true,
260286
"ImagePath": "ms-appx:///Assets/Fluent/dataGrid.png"
261287
},
262288
{
263289
"UniqueId": "DevWinUIGallery.Views.CardPage",
264290
"Title": "Card",
265291
"Subtitle": "A versatile container control that groups related content.",
266-
"IsNew": true,
267292
"ImagePath": "ms-appx:///Assets/Fluent/ContentIsland.png"
268293
},
269294
{
@@ -379,6 +404,10 @@
379404
"Title": "StepBar",
380405
"Subtitle": "A control that visually represents progress through a series of steps or stages, often used in wizards, forms, or multi-step processes.",
381406
"IsUpdated": true,
407+
"DataInfoBadge": {
408+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
409+
"InfoBadgeValue": "Updated"
410+
},
382411
"ImagePath": "ms-appx:///Assets/Fluent/Line.png"
383412
},
384413
{
@@ -511,7 +540,6 @@
511540
"UniqueId": "DevWinUIGallery.Views.OpacityMaskViewPage",
512541
"Title": "OpacityMaskView",
513542
"Subtitle": "A control that applies an opacity mask to its content, enabling gradient fades, shape-based transparency, or custom visual effects.",
514-
"IsUpdated": true,
515543
"ImagePath": "ms-appx:///Assets/Fluent/Acrylic.png"
516544
},
517545
{
@@ -555,6 +583,10 @@
555583
"Title": "Styles",
556584
"Subtitle": "Styles",
557585
"IsUpdated": true,
586+
"DataInfoBadge": {
587+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
588+
"InfoBadgeValue": "Updated"
589+
},
558590
"ImagePath": "ms-appx:///Assets/Fluent/InfoBadge.png"
559591
},
560592
{
@@ -630,7 +662,6 @@
630662
"UniqueId": "DevWinUIGallery.Views.ShimmerTextBlockPage",
631663
"Title": "Shimmer TextBlock",
632664
"Subtitle": "Target a TextBlock with a Composition Light",
633-
"IsNew": true,
634665
"ImagePath": "ms-appx:///Assets/Fluent/SwipeControl.png"
635666
},
636667
{
@@ -683,13 +714,16 @@
683714
"Title": "Speed Graph",
684715
"Subtitle": "A dynamic, animated graph control inspired by the Windows 11 copy dialog.",
685716
"IsNew": true,
717+
"DataInfoBadge": {
718+
"LandingPageInfoBadgeStyle": "StringInfoBadgeStyle",
719+
"InfoBadgeValue": "New "
720+
},
686721
"ImagePath": "ms-appx:///Assets/Fluent/Graph.png"
687722
},
688723
{
689724
"UniqueId": "DevWinUIGallery.Views.ConfettiCannonPage",
690725
"Title": "Confetti Cannon",
691726
"Subtitle": "A control that generates animated confetti particles, creating celebratory or festive visual effects.",
692-
"IsNew": true,
693727
"ImagePath": "ms-appx:///Assets/Fluent/Confetti.png"
694728
},
695729
{

0 commit comments

Comments
 (0)