TemplatedTaskLoader Events
Version 2.6.2 (2025-10-24)
New Features
TemplatedTaskLoader Events
Added four new events to the TemplatedTaskLoader class that are raised when each corresponding control template is loaded:
ResultControlTemplateLoaded- Fired when the result control template is displayedLoadingControlTemplateLoaded- Fired when the loading control template is displayedErrorControlTemplateLoaded- Fired when the error control template is displayedEmptyControlTemplateLoaded- Fired when the empty control template is displayed
Usage Example
// In your code-behind
myTemplatedTaskLoader.LoadingControlTemplateLoaded += (sender, e) =>
{
// React to loading state being displayed
Debug.WriteLine("Loading template is now visible");
};
myTemplatedTaskLoader.ResultControlTemplateLoaded += (sender, e) =>
{
// React to result state being displayed
Debug.WriteLine("Result template is now visible");
};
myTemplatedTaskLoader.ErrorControlTemplateLoaded += (sender, e) =>
{
// React to error state being displayed
Debug.WriteLine("Error template is now visible");
};
myTemplatedTaskLoader.EmptyControlTemplateLoaded += (sender, e) =>
{
// React to empty state being displayed
Debug.WriteLine("Empty template is now visible");
};Benefits
These events enable you to:
- Track state transitions for analytics or logging
- Trigger custom animations when states change
- Implement custom behaviors based on the loading state
- Simplify testing by monitoring state changes
Version 2.6.1 (Previous Release)
Bug Fixes
- Fixed the insertion of the loading states view that could cause an index out of range exception.