Exemplo n.º 1
0
 /// <inheritdoc />
 protected override void OnDeactivate()
 {
     if (loaderViewContainer != null)
     {
         if (loaderView != null)
         {
             loaderView.Load -= loaderViewElement_Load;
             loaderViewContainer.Children.Remove(loaderView);
             loaderView = null;
         }
         loaderViewContainer = null;
     }
 }
Exemplo n.º 2
0
 /// <inheritdoc />
 protected override bool OnActivate()
 {
     loaderViewContainer = MediaPlayer.Containers.OfType <Panel>().FirstOrDefault(e => e.Name == MediaPlayerTemplateParts.LoaderViewContainer);
     if (loaderViewContainer != null)
     {
         loaderView = new LoaderView();
         if (LoaderViewStyle != null)
         {
             loaderView.Style = LoaderViewStyle;
         }
         loaderView.Load += loaderViewElement_Load;
         loaderViewContainer.Children.Add(loaderView);
         return(true);
     }
     return(false);
 }