You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use the GetLogger extension method which is available on UserControl, and hence is also available on Page.
public sealed partial class LogSamplePage : Win8Sample.Common.LayoutAwarePage
{
private ILogger Log { get; set; }
public LogSamplePage()
{
this.InitializeComponent();
// you can initialize using the extension methods...
this.Log = this.GetLogger();
}
// ...
}
You could also the Log property as a protected property on the LayoutAwarePage class.