Exemplo n.º 1
0
 /// <summary>
 /// Renders the <see cref="Visual"/>
 /// </summary>
 /// <param name="drawingContext">The <see cref="DrawingContext"/> in which to render the <see cref="Visual"/></param>
 internal void Render(DrawingContext drawingContext)
 {
     foreach (Media.Animations.AnimationClock clock in this.AnimationClocks.Where(c => c.IsRunning))
     {
         clock.Render();
     }
     if(this.Effect != null)
     {
         this.Effect.BeginUse();
     }
     this.OnRender(drawingContext);
     if (this.Effect != null)
     {
         this.Effect.EndUse();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// When overriden in a class, this method allows the execution of code whenever the <see cref="Visual"/> is being rendered
 /// </summary>
 ///<param name="drawingContext">The <see cref="DrawingContext"/> in which the element has been rendered</param>
 protected abstract void OnRender(DrawingContext drawingContext);
Exemplo n.º 3
0
 /// <summary>
 /// When overriden in a class, renders the window in the specified <see cref="Photon.DrawingContext"/>
 /// </summary>
 /// <param name="drawingContext">The <see cref="Photon.DrawingContext"/> in which to render the window</param>
 protected override void OnRender(DrawingContext drawingContext)
 {
     if (this.Background != null)
     {
         drawingContext.DrawRectangle(new Rectangle(0, 0, this.Hwnd.Width, this.Hwnd.Height), Thickness.Empty, this.Background, null);
     }
     if (this.Child != null)
     {
         this.Child.Render(this.DrawingContext);
     }
 }