로컬에 존재하는 swf 파일을 wpf에 올리고 싶은 경우
WebBrowser wb = new WebBrowser();
wb.Url = new Uri(@"swf 파일 경로",UriKind.RelativeOrAbsolute);
WindowsFormsHost host = new WindowsFormsHost();
host.Child = wb;
Grid grid = new Grid();
grid.Children.Add(host);
Content = grid;
웹에 있는 swf 를 올리고 싶을 때는
WebBrowser wb = new WebBrowser();
wb.documentText = "<embed src='" + "웹에 있는 swf의 주소" + "'/>";
WindowsFormsHost host = new WindowsFormsHost();
host.Child = wb;
Grid grid = new Grid();
grid.Children.Add(host);
Content = grid;
물론.. 참조에
using System.Windows.Forms;
using System.Windows.Forms.Integration;
잊지 말기
xaml에는
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
이렇게 참조해서 사용하기
아래분 꺼 보고 약간 수정 했어요
http://blog.naver.com/inasie?Redirect=Log&logNo=70013551006
댓글 영역