Question: Which of the following is correct?
- Enable “NotifyOnValidationError” when you want the errors to be passed on in the hierarchy
- Enable “ValidateOnExceptions” property if you want to throw exceptions in your setters.
- If ValidatesOnNotifyDataErrors is set to true on a control, ErrorsChanged can be used to notify UI that errors collection has changed.
- All of the above.
Correct Answer: 4
Question: Conside the below class:
public class Contact
{
private double _cost=1500;
public double Cost
{
get { return _cost; }
set {_cost = value;}
}
private DateTime _date = DateTime.Now;
public DateTime CurrentDate
{
get{ return _date; }
set{ _date = value; }
}
}
Assuming that there is namespace declaration for the Contact class. What is the output of below XAML code:
<StackPanel Orientation="Vertical" >
<StackPanel.Resources><my:Contact x:Name="MyContact"/></StackPanel.Resources>
<Button Width="200" HorizontalAlignment="Left" Content="{Binding CurrentDate, Source={StaticResource MyContact}, StringFormat='Current Time: {0:G} '}" ></Button>
<TextBlock Text="{Binding Cost, Source={StaticResource MyContact}, StringFormat={0:c}}" ></TextBlock>
- Throws Compile time error becuase string formatting is not allowed in Silverlight
- Throw run-time error.
- Displays the current date and time.
- None of the above
Correct Answer: 3
Question: The data stored in the isolated storage area is encrypted?
- True
- False
- Not sure
Correct Answer: 2
Question: In Data Binding in silverlight, Which of the following is true about the Target object and Target property?
- Target object can be any object
- Target object must be a Dependency object
- Target property must be a Dependency property
- Target property can be any property
- Both 2 and 3
Correct Answer: 5
Question: INotifyPropertyChanged event provides a PropertyChanged Event Handler which is raised when value of the property changes. This works in which of the following cases
- When binding is set to OneTime
- When binding is set to OneWay
- When binding is set to TwoWay
- All of the above
- Both 2 and 3
Correct Answer: 5