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
Loadmethod, initialize theProfileproperty to a new instance ofProfile. - In the
Unloadmethod, set theProfileproperty tonull.
| Message | Line | Column | |
|---|---|---|---|
|
|