top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Explain TextBlock and Textbox Properties in XAML for wp8?

+2 votes
484 views
Explain TextBlock and Textbox Properties in XAML for wp8?
posted Oct 13, 2014 by Puhal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+3 votes

TEXTBLOCK:

The TextBlock control is one of the most fundamental controls in XAML, yet it's very useful.
In .NET you used Label here we used TextBlock both are same only. It allows you to put text on the screen, much like a Label control does, but in a simpler and less resource demanding way. A common understanding is that a Label is for short, one-line texts (but may include e.g. an image), while the TextBlock works very well for multiline strings as well, but can only contain text (strings).

XAML CODE FOR TEXTBLOCK:

    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="0,200,0,349" >
      <TextBlock Text="MY APPLICATION"  FontSize="25"/>
      <TextBlock Text="Query Home TEXTBLOCK Sample" HorizontalAlignment="Center"  FontSize="20" Height="130" Margin="76,0,43,0" VerticalAlignment="Bottom" Width="361"/>
   </StackPanel>

TEXTBOX:

This article discusses how to create a TextBox and set its various properties such as background and foreground colors, setting size and positions, fonts, wrapping, scrolling, and input validations.

SYNTAX for TEXTBOX:

    <TextBox />
    <TextBox></TextBox>
    <TextBox>Enter something here</TextBox>
answer Oct 14, 2014 by Jdk
Similar Questions
+1 vote

I need to know the XAML binding Properties and its description it will used for identify how to use binding in windows phone application??

+1 vote

windows phone 8 application TextBox accept currency values display decimal,thousand comma seperator
eg: 120.00// 1,200.00 etc

...