Skip to content

Commit 5a025ec

Browse files
authored
Add Id property for AdaptiveText and AdaptiveImage
1 parent 00d77f2 commit 5a025ec

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

components/Notifications/src/Adaptive/AdaptiveImage.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ public sealed class AdaptiveImage
1616
IAdaptiveChild,
1717
IAdaptiveSubgroupChild
1818
{
19+
/// <summary>
20+
/// Gets or sets the id of this image. Use for lock screen notification.
21+
/// </summary>
22+
public int? Id { get; set; }
23+
1924
/// <summary>
2025
/// Gets or sets the desired cropping of the image.
2126
/// Supported on Tiles since RTM. Supported on Toast since Anniversary Update.
@@ -81,6 +86,7 @@ internal Element_AdaptiveImage ConvertToElement()
8186
{
8287
Element_AdaptiveImage image = BaseImageHelper.CreateBaseElement(this);
8388

89+
image.Id = Id;
8490
image.Crop = HintCrop;
8591
image.RemoveMargin = HintRemoveMargin;
8692
image.Align = HintAlign;

components/Notifications/src/Adaptive/AdaptiveText.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ public sealed class AdaptiveText
2525
/// </summary>
2626
public BindableString Text { get; set; }
2727

28+
/// <summary>
29+
/// Gets or sets the id of this text. Use for lock screen notification.
30+
/// </summary>
31+
public int? Id { get; set; }
32+
2833
/// <summary>
2934
/// Gets or sets the target locale of the XML payload, specified as a BCP-47 language tags
3035
/// such as "en-US" or "fr-FR". The locale specified here overrides any other specified
@@ -108,6 +113,7 @@ internal Element_AdaptiveText ConvertToElement()
108113
{
109114
var answer = new Element_AdaptiveText()
110115
{
116+
Id = Id,
111117
Lang = Language,
112118
Style = HintStyle,
113119
Wrap = HintWrap,

0 commit comments

Comments
 (0)