c# - Inline Image and Video -Windows Phone UWP -


i having image source , video source in string below.

<div>புதுடெல்லி:</div><br /><br /><div>2014- நாடாளுமன்ற தேர்தல் </div><div><img src="/mmadmin/uploads/8cac42cc-d275-4589-9c91-2d005b2607fe_l_styvpf.gif" width="640" height="305" alt="" /></div><div><br /><div align="center"><object height="360"><embed src="https://www.youtube.com/embed/rprtdfqfwti" height="360px" width="100%" /></object></div></div></div> 

i need bind string in windows phone uwp controls. tried bind in richtextblock. inline image binding properly, video not binding in richtextblock.

i bind image , video using below methods

 private static inline generateiframe(htmlnode node)         {             try             {                 span s = new span();                 s.inlines.add(new linebreak());                  inlineuicontainer iui = new inlineuicontainer();                  int height = 160;                 int width = 300;                  webview ww = new webview();                 ww.navigate(new uri("http://video.ch9.ms/ch9/43df/9cf95ed5-b06f-4f9a-a216-983e107143df/abswp81part20.mp4", urikind.absolute));                 ww.height = 300;                 //ww.width = 300;                 ww.horizontalalignment = horizontalalignment.center;                 ww.verticalalignment = verticalalignment.center;                  //{                 //    source = new uri(node.attributes["src"].value, urikind.absolute)                 //    ,                 //    width = width,                 //    height = height                 //};                  iui.child = ww;                 s.inlines.add(iui);                 s.inlines.add(new linebreak());                 return s;             }             catch (exception ex)             {                 return null;             }         }    private static inline generateimage(htmlnode node)         {             span s = new span();             try             {                 inlineuicontainer iui = new inlineuicontainer();                 var sourceuri = system.net.webutility.htmldecode(node.attributes["src"].value);                 image img = new image() { source = new bitmapimage(new uri(sourceuri, urikind.absolute)) };                 img.stretch = stretch.uniform;                 img.verticalalignment = verticalalignment.center;                 img.horizontalalignment = horizontalalignment.center;                 img.width = window.current.bounds.width - 15;                 iui.child = img;                 s.inlines.add(iui);             }             catch (exception ex)             {             }             return s;         } 

please 1 guide solve issue. tried put whole string in web view produce page navigation unpleasant. on helpful. in advance


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -