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 > Windows Store Apps > Windows Store and Controls (C#) > Page และ Controls หรือ Toolbox เครื่องมือสำหรับออกแบบ UI บน XAML (C#)



Clound SSD Virtual Server

Page และ Controls หรือ Toolbox เครื่องมือสำหรับออกแบบ UI บน XAML (C#)

Page และ Controls หรือ Toolbox เครื่องมือสำหรับออกแบบ UI บน XAML (C#) Control ต่าง ๆ บน Windows Store Apps จะมีรูปแบบคล้าย ๆ กับการเขียน Application อื่น ๆ ของ .Net Application ซึ่งทำงานอยู่บน Interface ของ XAML และ Tools ของ Visual Studio ก็ช่วยให้การออกแบบหน้า Interface ต่าง ๆ นั้นได้ง่ายยิ่งขึ้น โดยอาศัยการ Drag และ Drop รายการ Control มาวางไว้บนหน้าจอ ซึ่งจะมีส่วนของ Properties ไว้กำหนดคุณสมบัติของ Control ต่าง ๆ ซึ่งทั้งหมดนี้เราไม่ต้องอาศัยการเขียน XAML โดยตรง ฉะนั้นการออกแบบหน้าจอของ Windows Store Apps จะมีความง่ายและทำได้อย่างมีประสิทธิภาพ

รายการ Controls ต่าง ๆ ของ Toolbox บน Windows Store Apps (C#) และ XAML
- AppBar - AppBarButton - AppBarSeparator - AppBarToggleButton - Border - Button - Canvas - CaptureElement - Checkbox - ComboBox - CommandBar - ContentControl - ContentPresenter - DatePicker - Ellipse - FlipView - Flyout - Frame - Grid - GridView - Hub - HubSection - HyperlinkButton - Image - ItemsControl - ItemsPresenter - ListBox - ListView - MediaElement - MenuFlyout - PasswordBox - Popup - ProgressBar - ProgressRing - RadioButton - Rectangle - RepeatButton - RichEditBox - RichTextBlock - RichTextBlockOverflow - ScrollBar - ScrollContentPresenter - ScrollViewer - SearchBox - SemanticZoom - Slider - StackPanel - TextBlock - TextBox - TimePicker - ToggleButton - ToggleSwitch - ToolTip - UserControl - VariableSizeWarpGrid - Viewbox - VirtualizingStackPanel - WebView - WrapGrid - AdControl

จะเห็นว่า Controls บน Windows Store Apps จะมีมากกว่าการเขียน Silverlight หรือ Windows Phone เหตุผลก็คือ Windows Store Apps ทำงานบน Windows 8 ซึ่งมันสามารถทำอะไรได้มากกว่า Windows Phone หรือ Silverlight นั่นเอง








มาดูรายละเอียดและส่วนประกอบต่าง ๆ ในการเรียกใช้งาน Control

Windows Store Apps Page และ Controls

ให้ทดสอบสร้าง Project แบบ Blank Page (XAML)

Windows Store Apps Page และ Controls

เปิดไฟล์ MainPage.xaml ซึ่งเป็นไฟล์ที่ใช้เป็น Interface ในการแสดงผล

Windows Store Apps Page และ Controls

จะเห็นว่าบน Visual Studio สามารถแสดงมุมมองของ XAML ให้เป็นแบบ Graphical Design ได้ หรือจะสลับมุมมองเป็น XAML ก็ได้เช่นเดียวกัน

Windows Store Apps Page และ Controls

ในฝั่งซ้่ายเราสามารถเปิด Toolbox ซึ่งจะประกอบด้วย Control ต่าง ๆ มากมาย

Windows Store Apps Page และ Controls

ในฝั่งขวาบน Visual Studio จะมีส่วนของ Properties ซึ่งไว้กำหนดคุณสมบัติต่าง ๆ ของ Control ที่นำมาใช้ยนหน้าจอ Page (XAML)

Windows Store Apps Page และ Controls

ในการสร้าง Controls สามารถใช้การ Drag and Drop เพื่อนำไปจัดส่งไว้บนหน้าจอ Page

Windows Store Apps Page และ Controls

เมื่อเราได้ Control แล้ว สามารถคลิกที่ Control นั้น ๆ ซึ่งจะปรากฏ Properties ในมุมขวามือ

Windows Store Apps Page และ Controls

ซึ่งในส่วนของ Properties นี้เอง เราสามารถกำหนดคุณสมบัติต่าง ๆ ของ Controls เช่น ชื่อ Control หรือในตัวอย่างนี้เป็น TextBlock ซึ่งสามารถปรับและขยายขนาดของ Font ได้

Windows Store Apps Page และ Controls

ทดสอบเปลี่ยน Text เป็นคำว่า "ThaiCreate.Com"

Windows Store Apps Page และ Controls

เมื่อเลือกมุมมองของ XAML จะเห็นว่ามีการ Genearate ตัว XAML มาให้อัตโนมัติ

Windows Store Apps Page และ Controls

ซึ่งประกอบด้วย Properties ต่าง ๆ ที่ได้สร้างไว้ก่อนหน้านี้

Windows Store Apps Page และ Controls

ทดสอบการทำงานผ่าน Simulator







.

   
Share


ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท


ลองใช้ค้นหาข้อมูล


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2014-02-20 20:49:36 / 2017-03-19 14:46:45
  Download : No files
 Sponsored Links / Related

 
Windows Store Apps กับ Template เช่น Blank , Grid , Hub , Split Apps (C#)
Rating :

 
โครงสร้างของ Project บน Windows Store Apps และไฟล์ต่าง ๆ ที่เกี่ยวข้อง (C#)
Rating :

 
รู้จัก Toolbox และ Controls พื้นฐานเช่น TextBlock , TextBox และ Button (C#)
Rating :

 
AppBar : TopAppBar / BottomAppBar บน Windows Store Apps (C#)
Rating :

 
ListBox แสดงข้อมูลแบบ List และ Combobox บน Windows Store (C#)
Rating :

 
ListView และ GridView บน Windows Store Apps (C#)
Rating :

 
FlipView สร้าง Image FlipView / Image Slide บน Windows Store Apps (C#)
Rating :

 
เล่นไฟล์ Media / Sound เช่น Video Clip / Sound ด้วย MediaElement (C#)
Rating :

 
WebView แสดงผล URL เว็บไซต์ หรือ HTML บน Windows Store Apps (C#)
Rating :

 
เล่นไฟล์ยูทูป บน Windows Store Apps ด้วย MediaElement (C#)
Rating :

 
File Pickers กับ Save Dialog / Open Dialog บน Windows Store Apps (C#)
Rating :

 
Context Menus and Popup Menu บน Windows Store Apps (C#)
Rating :

 
Geolocation and Location หาตำแหน่งของ Client ที่ใช้งาน Apps ของเรา (C#)
Rating :

 
Windows Store App และ Progress Bar การสร้าง Progress Bar (C#)
Rating :


ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 04
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 อัตราราคา คลิกที่นี่