a webbrowser

This commit is contained in:
Arti Zirk 2016-11-09 06:45:43 +02:00
parent 046f01a6c9
commit 3e8aabc331
3 changed files with 17 additions and 2 deletions

View File

@ -6,7 +6,9 @@
xmlns:local="clr-namespace:YTPlayer" xmlns:local="clr-namespace:YTPlayer"
mc:Ignorable="d" mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525"> Title="MainWindow" Height="350" Width="525">
<Grid> <DockPanel>
<WebBrowser Name="wbSample"></WebBrowser>
</DockPanel>
</Grid>
</Window> </Window>

View File

@ -23,6 +23,18 @@ namespace YTPlayer
public MainWindow() public MainWindow()
{ {
InitializeComponent(); InitializeComponent();
wbSample.Navigate("https://www.youtube.com/embed/-yPuWcCykNk?html5=1");
//wbSample.Navigate("https://www.youtube.com/html5");
} }
//private void wbSample_LoadCompleted(object sender, NavigationEventArgs e)
//{
// dynamic document = wbSample.Document;
// dynamic head = document.GetElementsByTagName("head")[0];
// dynamic scriptEl = document.CreateElement("script");
// scriptEl.text = "swfobject.embedSWF = function(){}";
// head.AppendChild(scriptEl);
//}
} }
} }

View File

@ -37,6 +37,7 @@
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />