Null DataContext
We haven't initialized the Profile
property yet and so it's null
. Because of that, the entire <div>
and its contents won't be rendered. We can use this feature to hide parts of the page whenever we want.
Tasks
Let's write some code to initialize the Profile
property on demand.
- In the
Load
method, initialize theProfile
property to a new instance ofProfile
. - In the
Unload
method, set theProfile
property tonull
.
Message | Line | Column | |
---|---|---|---|