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



Clound SSD Virtual Server

RadioButton - Windows Phone Controls

RadioButton - Windows Phone Controls สำหรับ RadioButton บน Windows Phone เป็น Controls สำหรับสร้าง Item ของรายการข้อมูลที่สามารถเลือกได้เพียงรายการใดรายการหนึ่ง

RadioButton - Windows Phone Controls

XAML
<RadioButton .../>
-or-
<RadioButton ...>
  content
</RadioButton>
-or-
<RadioButton ...>stringContent</RadioButton>


Example ตัวอย่างการใช้ RadioButton บน Windows Phone

XAML

RadioButton - Windows Phone Controls

<!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Button Content="Submit" Height="72" HorizontalAlignment="Left" Margin="148,213,0,0" Name="btnSubmit" VerticalAlignment="Top" Width="160" />
            <TextBlock Height="30" HorizontalAlignment="Center" Margin="48,321,58,0" Name="txtResult1" Text="Result 1" VerticalAlignment="Top" Width="350" TextAlignment="Center" />
            <TextBlock Height="30" HorizontalAlignment="Center" Margin="48,357,58,0" Name="txtResult2" Text="Result 2" VerticalAlignment="Top" Width="350" TextAlignment="Center" />
            <RadioButton Content="Item 1" Height="72" HorizontalAlignment="Left" Margin="148,71,0,0" Name="Raido1" VerticalAlignment="Top" />
            <RadioButton Content="Item 2" Height="72" HorizontalAlignment="Left" Margin="148,135,0,0" Name="Raido2" VerticalAlignment="Top" />
        </Grid>
    </Grid>


VB.NET
    Private Sub btnSubmit_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btnSubmit.Click
        Me.txtResult1.Text = If(Me.Raido1.IsChecked, "RadioButton Item 1 is Checked", "RadioButton Item 1 is UnChecked")

        If Me.Raido2.IsChecked = True Then
            Me.txtResult2.Text = "RadioButton Item 2 is Checked"
        Else
            Me.txtResult2.Text = "RadioButton Item 2 is UnChecked"
        End If
    End Sub

C#
private void btnSubmit_Click(System.Object sender, System.Windows.RoutedEventArgs e)
{
	this.txtResult1.Text = this.Raido1.IsChecked ? "RadioButton Item 1 is Checked" : "RadioButton Item 1 is UnChecked";

	if (this.Raido2.IsChecked == true) {
		this.txtResult2.Text = "RadioButton Item 2 is Checked";
	} else {
		this.txtResult2.Text = "RadioButton Item 2 is UnChecked";
	}
}



Screenshot

RadioButton - Windows Phone Controls

แสดง RadioButton บนหน้าจอ App และการอ่านค่าจาก RadioButton






   
Share


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


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


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2012-09-09 14:17:29 / 2012-09-10 10:17:38
  Download : Download  RadioButton - Windows Phone Controls
 Sponsored Links / Related

 
รู้จักกับ Controls เครื่องมือ ต่าง ๆ ที่ใช้สำหรับการเขียนโปรแกรมบน Windows Phone
Rating :

 
AdControl - Windows Phone Controls
Rating :

 
Border - Windows Phone Controls
Rating :

 
Button - Windows Phone Controls
Rating :

 
Canvas - Windows Phone Controls
Rating :

 
CheckBox - Windows Phone Controls
Rating :

 
Ellipse - Windows Phone Controls
Rating :

 
Grid - Windows Phone Controls
Rating :

 
HyperlinkButton - Windows Phone Controls
Rating :

 
Image - Windows Phone Controls
Rating :

 
ListBox - Windows Phone Controls
Rating :

 
Map - Windows Phone Controls
Rating :

 
MediaElement - Windows Phone Controls
Rating :

 
Panorama - Windows Phone Controls
Rating :

 
PasswordBox - Windows Phone Controls
Rating :

 
Pivot - Windows Phone Controls
Rating :

 
ProgressBar - Windows Phone Controls
Rating :

 
Rectangle - Windows Phone Controls
Rating :

 
RepeatButton - Windows Phone Controls
Rating :

 
ScrollViewer - Windows Phone Controls
Rating :

 
Slider - Windows Phone Controls
Rating :

 
StackPanel - Windows Phone Controls
Rating :

 
TextBlock - Windows Phone Controls
Rating :

 
TextBox - Windows Phone Controls
Rating :

 
ToggleButton - Windows Phone Controls
Rating :

 
WebBrowser - Windows Phone Controls
Rating :

 
รู้จักกับ Custom User Control และการสร้าง UserControl บน Windows Phone
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 01
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 อัตราราคา คลิกที่นี่