Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > Mobile > Mobile Forum > WP - อยากทราบเรื่อง WebView ของ Windows Phone ว่าทำอย่างไรคับ



 

WP - อยากทราบเรื่อง WebView ของ Windows Phone ว่าทำอย่างไรคับ

 



Topic : 097722



โพสกระทู้ ( 15 )
บทความ ( 0 )



สถานะออฟไลน์




รบกวนผู้รู้หน่อยคับ

อยากจะทำ webview แบบ Andrid ใน Windows Phone แต่ไม่รู้ว่าคือ Control ตัวไหน

แล้วชื่อเรียกว่าอะไร ใครพอรู้ช่วยแนะนำทีนะคับ

และวิธีการทำด้วยนะคับ

ขอบคุณมากคับ



Tag : Mobile, C#, Windows Phone, Mobile









ประวัติการแก้ไข
2013-07-12 12:18:31
Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2013-07-12 12:17:35 By : tonttt View : 1044 Reply : 8
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

ใช้ WebBrowser ครับ



WebBrowser - Windows Phone Controls







แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-07-12 12:34:10 By : mr.win
 


 

No. 2



โพสกระทู้ ( 15 )
บทความ ( 0 )



สถานะออฟไลน์


ขอบคุณมากคับ

ขอถามอีกคำถามนะคับ

คือผมจะโช HTML ที่เรากำหนดเอง

ได้ไหมคับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-07-12 14:09:26 By : tonttt
 

 

No. 3



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

readme.htm
<html>
   <head><title>Sample Readme File</title></head>
   <body>
      <p>Sample Readme Content</p>
   </body>
</html>


Code (C#)
public MainPage()
{    InitializeComponent();

    SupportedOrientations = SupportedPageOrientation.Portrait | SupportedPageOrientation.Landscape;

    webBrowser1.Loaded += WebBrowser_OnLoaded;
}

private void WebBrowser_OnLoaded(object sender, RoutedEventArgs e)
{
    SaveFilesToIsoStore();
    webBrowser1.Navigate(new Uri("readme.htm", UriKind.Relative));
}


ง่ายสุด ๆ ครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-07-12 14:11:54 By : mr.win
 


 

No. 4



โพสกระทู้ ( 15 )
บทความ ( 0 )



สถานะออฟไลน์


โปรเจคผมไม่มีหน้า html อ่ะคับ

คือผมจะดึงโค้ด HTML จาก Web Server ที่ทำไว้ขึ้นมาโชว์อ่ะครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-07-12 14:19:09 By : tonttt
 


 

No. 5



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

Code (C#)
public string BuildHTML(string htmlFromWS)
{
    StringBuilder html = new StringBuilder(@"<!DOCTYPE html>
                    <html class=""ui-mobile-rendering"">
                    <head>
                        <meta charset=""utf-8"" />
                        <meta name=""viewport"" 
                          content=""initial-scale=1.0; maximum-scale=1.0"" />
                        <link rel=""stylesheet"" 
                          type=""text/css"" 
                          href=""/html/jquery.mobile.structure-1.0.1.min.css"" />
                        <link rel=""stylesheet"" 
                          type=""text/css"" 
                          href=""/html/style.css"" />
                        <script type=""text/javascript"" 
                          src=""/html/jquery-1.7.1.min.js""></script>
                        <script type=""text/javascript"" 
                          src=""/html/jquery.mobile-1.0.1.min.js""></script>
                    </head>
                    <body style=""-webkit-user-select: none;"">
                        <div style=""padding:80px 0 0 0"" 
                          data-role=""page"">
                        <div data-role=""content"">");
 
    html.Append(htmlFromWS);
    html.Append("</div></div></body></html>");
    return html.ToString();
}


Code (C#)
public static void CopyContentToIsolatedStorage(string file)
{
    // Obtain the virtual store for the application.
    IsolatedStorageFile iso = IsolatedStorageFile.GetUserStoreForApplication();
 
    if (iso.FileExists(file))
        return;
 
    var fullDirectory = System.IO.Path.GetDirectoryName(file);
    if (!iso.DirectoryExists(fullDirectory))
        iso.CreateDirectory(fullDirectory);
 
    // Create a stream for the file in the installation folder.
    using (Stream input = Application.GetResourceStream(new Uri(file, UriKind.Relative)).Stream)
    {
        // Create a stream for the new file in isolated storage.
        using (IsolatedStorageFileStream output = iso.CreateFile(file))
        {
            // Initialize the buffer.
            byte[] readBuffer = new byte[4096];
            int bytesRead = -1;
 
            // Copy the file from the installation folder to isolated storage. 
            while ((bytesRead = input.Read(readBuffer, 0, readBuffer.Length)) > 0)
            {
                output.Write(readBuffer, 0, bytesRead);
            }
        }
    }
}


http://www.codeproject.com/Articles/333036/Include-static-JS-CSS-image-files-from-IsolatedSto

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-07-12 14:33:34 By : mr.win
 


 

No. 6



โพสกระทู้ ( 15 )
บทความ ( 0 )



สถานะออฟไลน์


ขอบคุณมากๆ คับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-07-12 14:35:14 By : tonttt
 


 

No. 7



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook


แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-07-12 14:41:10 By : mr.win
 


 

No. 8



โพสกระทู้ ( 15 )
บทความ ( 0 )



สถานะออฟไลน์


เอ่อคือว่ามัน error

operation not permitted on isolatedstoragefilestream

จะแก้ไขยังไงอ่าคับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-07-12 15:48:00 By : tonttt
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : WP - อยากทราบเรื่อง WebView ของ Windows Phone ว่าทำอย่างไรคับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่