How to set the youtube player location fix in a xaml page, its getting on the botton of the page ...instead of the right position.
-
Hi, I took a class for youtube player and create a instance of that youtube player in Page3.xaml page..The issue is at runtime (F5), in the application i got the youtube video in the bottom of the page and even its there for each and every xaml pae while i am navigating..how to resolve this issue for setting the youtube video exact position where i want and stop reflecting to other pages .The code is as below: in Class1.cs -------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Media.Animation;
using System.Windows.Browser;namespace K12
{public class YouTubePlayer : IDisposable { /// <summary> /// The default with of a player, if none is specified. /// </summary> public const int DefaultWidth = 425; /// <summary> /// The default height of a player, if none is specified. /// </summary> public const int DefaultHeight = 344; #region Private properties private string uniqueId = Guid.NewGuid().ToString(); private double top; private double left; private double height = DefaultHeight; private double width = DefaultWidth; private string videoId; private bool isEmbeded; private HtmlElement div; #endregion /// <summary> /// Creates a player for the given video id. You must invoke Embed() /// later, to actually insert the video into the page. /// </summary> /// <param name="videoId"></param> public YouTubePlayer(string videoId) { this.videoId = videoId; } /// <summary> /// The absolute y position of this player. /// </summary> public double Top { get { return top; } set { top = value; if (isEmbeded) { SetStyleProperty(DivId, "top", "\\"" + (int)top + "px\\""); } } } /// <summary> /// The absolute x position of this player. /// </summary> public double L