PrepAway - Latest Free Exam Questions & Answers

What should you do ?

….
set
{
_Data = value;
}
}

private void NofityPropertyChanged(string info)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(info));
}
}

The UI is not being updated when the Data property is set.

You need to ensure that the DisplayData class correctly updates the UI when the Data ..

What should you do ?

PrepAway - Latest Free Exam Questions & Answers

A.
Insert the followiing code at line 14
NotifyPropertyChanged(“Data”);

B.
Insert the followiing code at line 16
NotifyPropertyChanged(“Data”);

C.
Insert the followiing code at line 14
NotifyPropertyChanged(value);

D.
Insert the followiing code at line 16
NotifyPropertyChanged(value);

One Comment on “What should you do ?

  1. Mr ijs says:

    Full question text:

    You are developing a Windows Presentation Foundation (WPF) application with the following class.
    (Line numbers are included for reference only)

    01 public class DisplayData: INotifyPropertyChanged
    02 {
    03 public event
    04 PropertyChangedEventHandler PropertyChanged;
    05 private string Data;
    06 public string Data
    07 {
    08 get
    09 {
    10 return _Data;
    11 }
    12 set
    13 {
    14
    15 _Data = value;
    16
    17 }
    18 }
    19 private void NotifyPropertyChanged (string Info)
    20 {
    21 if (PropertyChanged != null)
    22 {
    23 PropertyChanged (this,
    24 new PropertyChangedEventArgs(Info));
    25 }
    26 }
    27 }

    The UI is not being updated when the Data property is set.
    You need to ensure that the DisplayData class correctly updates the UI when the Data property is set.
    What should you do?




    0



    0

Leave a Reply