Skip to content
Merged
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
ebd98c6
Merge pull request #12 from dotnet/master
adegeo Aug 14, 2020
ae8c1a5
Merge pull request #21 from dotnet/master
adegeo Sep 1, 2020
fa59e60
Merge pull request #23 from dotnet/master
adegeo Sep 2, 2020
daf66e7
Merge pull request #25 from dotnet/master
adegeo Sep 2, 2020
6cc5bca
Merge pull request #32 from dotnet/master
adegeo Sep 4, 2020
7631737
Update defining-default-values-with-the-shouldserialize-and-reset-met…
RussKie Sep 10, 2020
026b53d
Update xaml-syntax-in-detail.md (#43)
Youssef1313 Sep 15, 2020
9c0a288
Merge pull request #45 from dotnet/master
adegeo Sep 16, 2020
695d0a2
Merge pull request #49 from dotnet/master
adegeo Sep 17, 2020
e28a535
Merge branch 'master' into publish-17711
cxwtool Sep 22, 2020
95374f1
Merge pull request #55 from dotnet/publish-17711
BillWagner Sep 22, 2020
bcc2e76
Merge branch 'master' into publish-15572
cxwtool Sep 29, 2020
4fc7ebb
Merge pull request #59 from dotnet/publish-15572
BillWagner Sep 29, 2020
b98f4b8
Fix missing letter in first link of article (#68)
ignispotentia Oct 12, 2020
84713aa
Merge branch 'master' into publish-30170
cxwtool Oct 13, 2020
f8b2aab
Merge pull request #71 from dotnet/publish-30170
BillWagner Oct 13, 2020
58f5f12
Merge branch 'master' into publish-19828
cxwtool Oct 22, 2020
4000d5e
Merge pull request #89 from dotnet/publish-19828
BillWagner Oct 22, 2020
5bd63ee
Merge pull request #97 from dotnet/master
adegeo Oct 28, 2020
e50074c
Merge branch 'master' into publish-8192
cxwtool Nov 3, 2020
d2b8992
Merge pull request #102 from dotnet/publish-8192
BillWagner Nov 3, 2020
db1fc37
Merge branch 'master' into publish-15147
cxwtool Nov 4, 2020
79836c0
Merge pull request #105 from dotnet/publish-15147
BillWagner Nov 4, 2020
bee0cc6
Merge branch 'master' into publish-27362
cxwtool Nov 6, 2020
cf3b75e
Merge pull request #113 from dotnet/publish-27362
BillWagner Nov 6, 2020
3652f9b
Merge branch 'master' into publish-28416
cxwtool Nov 10, 2020
a88bf14
Merge pull request #117 from dotnet/publish-28416
adegeo Nov 10, 2020
2fbec48
Merge branch 'master' into publish-24024
cxwtool Nov 12, 2020
169c173
Merge pull request #120 from dotnet/publish-24024
BillWagner Nov 12, 2020
87f93ef
Merge branch 'master' into publish-20660
cxwtool Nov 14, 2020
0fd7bfa
Merge pull request #136 from dotnet/master
adegeo Nov 24, 2020
981e1cd
Merge pull request #123 from dotnet/publish-20660
BillWagner Nov 30, 2020
487fd28
Merge branch 'master' into publish-7434
cxwtool Dec 3, 2020
de8549b
Merge pull request #141 from dotnet/publish-7434
BillWagner Dec 3, 2020
3a6eeac
Merge branch 'master' into publish-254
cxwtool Dec 4, 2020
1ab344c
Merge pull request #145 from dotnet/publish-254
BillWagner Dec 4, 2020
ef80b65
Merge branch 'master' into publish-21020
cxwtool Dec 8, 2020
bad997e
Merge pull request #147 from dotnet/publish-21020
BillWagner Dec 8, 2020
42ebf02
Merge branch 'master' into publish-17684
cxwtool Dec 9, 2020
9f6df08
Merge pull request #149 from dotnet/publish-17684
BillWagner Dec 9, 2020
f4bfcc0
Merge branch 'master' into publish-27798
cxwtool Dec 10, 2020
e8e3f6f
Merge pull request #152 from dotnet/publish-27798
BillWagner Dec 10, 2020
72b0e49
Merge branch 'master' into publish-28185
cxwtool Dec 15, 2020
dd2882e
Merge pull request #155 from dotnet/publish-28185
BillWagner Dec 15, 2020
cf26656
Merge pull request #157 from dotnet/master
adegeo Dec 18, 2020
2426bbf
Merge branch 'master' into publish-30962
cxwtool Jan 16, 2021
302273b
Merge pull request #171 from dotnet/publish-30962
BillWagner Jan 16, 2021
79c96db
Merge branch 'master' into publish-20989
cxwtool Jan 19, 2021
7e271d4
Merge pull request #174 from dotnet/publish-20989
BillWagner Jan 19, 2021
e54b0a0
Merge branch 'master' into publish-24627
cxwtool Jan 20, 2021
7d5333d
Merge pull request #175 from dotnet/publish-24627
BillWagner Jan 20, 2021
85e78c8
Merge branch 'master' into publish-12373
cxwtool Jan 28, 2021
7f48b9e
Merge pull request #185 from dotnet/publish-12373
BillWagner Jan 28, 2021
cd23c90
Merge branch 'master' into publish-23450
cxwtool Feb 3, 2021
d7d89e9
Merge pull request #197 from dotnet/publish-23450
BillWagner Feb 3, 2021
455923e
Merge pull request #199 from dotnet/master
adegeo Feb 3, 2021
24909fd
Merge branch 'master' into publish-31801
cxwtool Feb 5, 2021
2575c2a
Merge pull request #203 from dotnet/publish-31801
BillWagner Feb 5, 2021
2e16d3f
Merge branch 'master' into publish-23600
cxwtool Feb 10, 2021
0a512a7
Merge pull request #210 from dotnet/publish-23600
BillWagner Feb 10, 2021
b74aadc
Merge branch 'master' into publish-18667
cxwtool Mar 4, 2021
03df1de
Merge pull request #218 from dotnet/publish-18667
BillWagner Mar 4, 2021
754c22d
Merge pull request #1007 from dotnet/main
BillWagner Mar 9, 2021
9f8de7a
Merge branch 'main' into publish-21415
cxwtool Mar 10, 2021
069786b
Merge pull request #1010 from dotnet/publish-21415
gewarren Mar 10, 2021
fcd77d8
merge main branch
cxwtool Mar 16, 2021
b11ebcd
Merge pull request #1013 from dotnet/publish-29878
gewarren Mar 17, 2021
3af4878
merge main branch
cxwtool Mar 24, 2021
bf5dd80
Merge pull request #1019 from dotnet/publish-32535
BillWagner Mar 24, 2021
bf171b4
merge main branch
cxwtool Apr 8, 2021
df2d6ff
Merge pull request #1030 from dotnet/publish-32113
BillWagner Apr 8, 2021
366fb32
Merge pull request #1033 from dotnet/main
adegeo Apr 15, 2021
32616f6
Merge pull request #1035 from dotnet/main
adegeo Apr 15, 2021
1fdc0bb
merge main branch
cxwtool Apr 22, 2021
8d6c7ea
Merge pull request #1039 from dotnet/publish-27105
BillWagner Apr 22, 2021
b601c84
merge main branch
cxwtool Apr 24, 2021
4eb8696
Merge pull request #1042 from dotnet/publish-15239
BillWagner Apr 24, 2021
6fed9f3
Merge pull request #1043 from dotnet/main
adegeo Apr 24, 2021
5e8f0ae
merge main branch
cxwtool Apr 30, 2021
b605226
Merge pull request #1050 from dotnet/publish-20136
BillWagner Apr 30, 2021
6ee7e8c
merge main branch
cxwtool May 1, 2021
3fc34f1
Merge pull request #1054 from dotnet/publish-145
BillWagner May 1, 2021
6645466
merge main branch
cxwtool May 5, 2021
1e36425
Merge pull request #1060 from dotnet/publish-4951
BillWagner May 5, 2021
58592ea
merge main branch
cxwtool May 7, 2021
bed82cb
Merge pull request #1063 from dotnet/publish-3044
BillWagner May 7, 2021
3ed6bf8
merge main branch
cxwtool May 8, 2021
a6216f4
Merge pull request #1065 from dotnet/publish-9447
BillWagner May 8, 2021
b1e7a0e
Merge pull request #1073 from dotnet/main
adegeo May 18, 2021
1db2667
merge main branch
cxwtool May 27, 2021
c9f9294
Merge pull request #1078 from dotnet/publish-10905
BillWagner May 27, 2021
720b0be
merge main branch
cxwtool Jun 2, 2021
e316f94
Merge pull request #1085 from dotnet/publish-30830
BillWagner Jun 2, 2021
227e3c7
merge main branch
cxwtool Jun 3, 2021
fe74f52
Merge pull request #1087 from dotnet/publish-3231
BillWagner Jun 3, 2021
180e3a1
merge main branch
cxwtool Jun 11, 2021
259b6c6
Merge pull request #1091 from dotnet/publish-21788
BillWagner Jun 11, 2021
d2d33ba
merge main branch
cxwtool Jun 12, 2021
4786ed1
Merge pull request #1094 from dotnet/publish-7235
BillWagner Jun 12, 2021
7eb672e
merge main branch
cxwtool Jun 16, 2021
e7114fe
Merge pull request #1098 from dotnet/publish-24915
BillWagner Jun 16, 2021
6d05c81
merge main branch
cxwtool Jun 18, 2021
3f21c73
Merge pull request #1099 from dotnet/publish-21594
BillWagner Jun 18, 2021
388b963
merge main branch
cxwtool Jun 19, 2021
36b2279
Merge pull request #1101 from dotnet/publish-24619
BillWagner Jun 19, 2021
6a361b4
merge main branch
cxwtool Jul 1, 2021
5d473fc
Merge pull request #1106 from dotnet/publish-1312
BillWagner Jul 1, 2021
5071cc2
merge main branch
cxwtool Jul 10, 2021
28fa4fd
Merge pull request #1109 from dotnet/publish-7125
BillWagner Jul 10, 2021
0e008d5
merge main branch
cxwtool Jul 17, 2021
9214df7
Merge pull request #1114 from dotnet/publish-3176
BillWagner Jul 17, 2021
aff6c6f
merge main branch
cxwtool Jul 20, 2021
d4e0813
Merge pull request #1117 from dotnet/publish-13111
BillWagner Jul 20, 2021
c61764b
merge main branch
cxwtool Jul 22, 2021
40c1c7b
Merge pull request #1120 from dotnet/publish-2261
BillWagner Jul 22, 2021
42e9f24
Merge pull request #1128 from dotnet/main
adegeo Jul 30, 2021
2837258
merge main branch
cxwtool Jul 31, 2021
109d9e0
Merge pull request #1131 from dotnet/publish-12031
adegeo Aug 3, 2021
2349be5
merge main branch
cxwtool Aug 12, 2021
977fa0f
Merge pull request #1136 from dotnet/publish-19744
BillWagner Aug 12, 2021
8b4125d
merge main branch
cxwtool Aug 28, 2021
df0e1c2
Merge pull request #1149 from dotnet/publish-15046
BillWagner Aug 28, 2021
0c76e39
merge main branch
cxwtool Sep 17, 2021
02ea5c3
Merge pull request #1152 from dotnet/publish-3839
BillWagner Sep 17, 2021
0ce0e6b
merge main branch
cxwtool Sep 25, 2021
ec1ebb1
Merge pull request #1161 from dotnet/publish-18515
BillWagner Sep 25, 2021
57bab6d
merge main branch
cxwtool Sep 28, 2021
1780b7c
Merge pull request #1163 from dotnet/publish-12384
BillWagner Sep 28, 2021
7884fb3
merge main branch
cxwtool Oct 1, 2021
118c47b
Merge pull request #1167 from dotnet/publish-18565
BillWagner Oct 1, 2021
ec3f9fa
merge main branch
cxwtool Oct 6, 2021
36962f2
Merge pull request #1172 from dotnet/publish-19060
BillWagner Oct 6, 2021
91dd297
merge main branch
cxwtool Oct 12, 2021
3d167cc
Merge pull request #1176 from dotnet/publish-7840
BillWagner Oct 12, 2021
4d862d5
Merge pull request #1194 from dotnet/main
adegeo Oct 27, 2021
b71a80d
Merge pull request #1198 from dotnet/main
adegeo Oct 28, 2021
af150c2
Merge pull request #1207 from dotnet/main
adegeo Nov 5, 2021
a7b47b8
Merge pull request #1212 from dotnet/main
adegeo Nov 12, 2021
7eebec8
merge main branch
cxwtool Nov 16, 2021
218f20a
merge main branch
cxwtool Nov 16, 2021
6e1bf1b
Merge pull request #1217 from dotnet/publish-26931
BillWagner Nov 16, 2021
769b4cb
Merge pull request #1216 from dotnet/publish-18437
BillWagner Nov 16, 2021
20f8b58
Merge pull request #1218 from dotnet/main
adegeo Nov 16, 2021
25f3ab4
Merge pull request #1222 from dotnet/main
adegeo Nov 18, 2021
9846de5
merge main branch
cxwtool Dec 2, 2021
1b138cd
Merge pull request #1234 from dotnet/publish-9028
BillWagner Dec 2, 2021
1b9d3aa
merge main branch
cxwtool Dec 3, 2021
c226bfa
Merge pull request #1235 from dotnet/publish-27506
BillWagner Dec 3, 2021
d082ecf
merge main branch
cxwtool Dec 8, 2021
eeffa91
Merge pull request #1245 from dotnet/publish-20968
BillWagner Dec 8, 2021
f2fd64d
merge main branch
cxwtool Dec 9, 2021
9218668
Merge pull request #1248 from dotnet/publish-28760
BillWagner Dec 9, 2021
5178662
merge main branch
cxwtool Jan 5, 2022
8587b28
Merge pull request #1263 from dotnet/publish-5018
BillWagner Jan 5, 2022
19e8c6b
merge main branch
cxwtool Jan 6, 2022
7ca4b81
Merge pull request #1264 from dotnet/publish-23136
BillWagner Jan 6, 2022
3e1acf0
merge main branch
cxwtool Jan 8, 2022
750928d
Merge pull request #1268 from dotnet/publish-16318
BillWagner Jan 8, 2022
032c8c7
merge main branch
cxwtool Jan 14, 2022
055a391
Merge pull request #1275 from dotnet/publish-24248
BillWagner Jan 14, 2022
5a0e087
merge main branch
cxwtool Jan 22, 2022
46e0170
Merge pull request #1282 from dotnet/publish-4339
BillWagner Jan 22, 2022
ec98bc8
merge main branch
cxwtool Jan 25, 2022
142cd7c
Merge pull request #1286 from dotnet/publish-21568
BillWagner Jan 25, 2022
2c4740d
Merge pull request #1295 from dotnet/live
adegeo Feb 1, 2022
5c89943
Update xaml-syntax-in-detail.md
adegeo Feb 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,22 @@ ms.assetid: 7b6c5e00-3771-46b4-9142-5a80d5864a5e

- The designer generates more efficient code.

> [!NOTE]
> Either apply the <xref:System.ComponentModel.DefaultValueAttribute> or provide `Reset`*PropertyName* and `ShouldSerialize`*PropertyName* methods. Do not use both.
> [!NOTE]
> Either apply the <xref:System.ComponentModel.DefaultValueAttribute> or provide `Reset`*PropertyName* and `ShouldSerialize`*PropertyName* methods. Do not use both.

When declaring a `ShouldSerialize` or `Reset` method, use the `private` access modifier. These methods are usually invoked by the designer and not by user code.

The `Reset`*PropertyName* method sets a property to its default value, as shown in the following code fragment.

```vb
Public Sub ResetMyFont()
Private Sub ResetMyFont()
MyFont = Nothing
End Sub
```

```csharp
public void ResetMyFont() {
private void ResetMyFont()
{
MyFont = null;
}
```
Expand All @@ -44,15 +47,16 @@ public void ResetMyFont() {
```vb
'Returns true if the font has changed; otherwise, returns false.
' The designer writes code to the form only if true is returned.
Public Function ShouldSerializeMyFont() As Boolean
Return Not (thefont Is Nothing)
Private Function ShouldSerializeMyFont() As Boolean
Return thefont IsNot Nothing
End Function
```

```csharp
// Returns true if the font has changed; otherwise, returns false.
// The designer writes code to the form only if true is returned.
public bool ShouldSerializeMyFont() {
private bool ShouldSerializeMyFont()
{
return thefont != null;
}
```
Expand Down Expand Up @@ -94,11 +98,11 @@ Public Class MyControl
End Set
End Property

Public Function ShouldSerializeMyFont() As Boolean
Return Not (thefont Is Nothing)
Private Function ShouldSerializeMyFont() As Boolean
Return thefont IsNot Nothing
End Function

Public Sub ResetMyFont()
Private Sub ResetMyFont()
MyFont = Nothing
End Sub
End Class
Expand Down Expand Up @@ -128,11 +132,13 @@ public class MyControl : Control {
}
}

public bool ShouldSerializeMyFont() {
private bool ShouldSerializeMyFont()
{
return thefont != null;
}

public void ResetMyFont() {
private void ResetMyFont()
{
MyFont = null;
}
}
Expand Down