Windows 8 controls

Today I’ll compare built-in controls in Windows 8 and their counterparts in WPF and Silverlight. I’ll describe all the control classes except the ItemsControl classes and panels.

You can see the most often used controls of Windows 8 in the following illustration:

The following controls are supported by both WPF/Silverlight and Windows 8 technologies:
Border
Button
ContentControl
ContentPresenter
Frame
HyperlinkButton
Image
MediaElement
PasswordBox
ProgressBar
RadioButton
RepeatButton
ScrollViewer
Slider
TextBlock
TextBox
ToggleButton
ToolTip
ViewBox
WebBrowser

The following controls are not available in Windows 8:
Calendar
DatePicker
Expander
GridSplitter
GroupBox
Label
RichTextBox
TabItem

The following controls exists only in Windows 8:
ProgressRing – displays an indeterminate circular animation, switched by the property IsActive;
RichTextBlock – the read-only version of the RichTextBox;
ToggleSwitch – looks the same as the CheckBox control with the custom template.

Also the following controls are different at some point in Windows 8:
TextBlock – can contain the same tags as the RichTextBlock has such as Italic, Underline, LineBreak, etc;
TextBox – has the clear button on the right which removes all the text;
PasswordBox – has the reveal button on the right which displays the password as a decoded text.

That’s all the differences which I’ve noticed so far, next time I’ll describe the ItemsControl classes.

About these ads

6 Responses to Windows 8 controls

  1. Steve says:

    How is it possible there is not a calendar or date picker control in Visual Studio 2012 for Windows 8????

    • vortexwolf says:

      As far as I remember, these controls were added to built-in ones only when .Net Framework 4.0 was released. But with .net 3.5 you had to used WPF Toolkit.
      I expect that there will be some kind of Windows 8 Apps Toolkit with additional controls.

  2. Mikhail says:

    How I can browse code?
    Thx.

    • vortexwolf says:

      Unfortunately I haven’t saved it. Though the code was simple, just ordinary controls without any customization.

      • Mikhail says:

        I try write PasswordBox, but I cant make a RevealButton behavior. I have Grid with RevealButton, ContentControl and RevealTextBlock (Opacity = 0). I try set RevealTextBlock Opacity to 1 In RevealTextBlock VisualStateManager (VisualState = “Pressed”), but this solution doesnt work :( Have u any idea? Thx and sorry me for my eng:(

      • vortexwolf says:

        The PasswordBox control is a built-in control in Windows 8. But if you want to implement a similar control by yourself, the possible solution is to use TextBox and PasswodBox, keep their text synchronized and change their visibility.

        Also it would be easier and more reliable to work with controls in C# code rather than in XAML.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 25 other followers

%d bloggers like this: