You are on page 1of 18

‫بسم هللا الرحمن الرحيم‬

‫السالم عليكم‬
Topic :
• Windows Form Controls
• TextBlock
• TabControl
• ScrollBar
• ViewBox
Group Members :
• Names Registeration Topic

• Arsalan kkashif FA16-BCS-058 TextBlock


• Shoaib Ashiq FA16-BCS-062 TabCotrol
• Kashif Ilyas FA16-BCS-028 ScrollBar
• Mubashir Javed FA16-BCS-070 ViewBox
TextBlock
 A TextBlock control in WPF provides a
lightweight control for displaying small amounts
of flow content. This tutorial and code examples
demonstrates how to use a
WPF TextBlock control in a WPF app and set its
font style, text formatting, alignment, text
decorations and other properties in XAML and
C#
• Wrapping, Alignment, Padding
• Text Wrapping property
• Text Alignment property
• Padding property

• In Line
• Represent the Collection text inline within a text block

• Text Decoration
• This represent decoration applied on content of Text Block

• Background property
• Background color of text block
Example of Text Block
TabControl
The Windows Forms TabControl display multiple tabs. The tabs can contains pictures
and other Controls. You can add and remove tabs programmatically and can also do it
by going into the properties of TabControl. An application can define multiple pages
for the same area of a window or dialog box. Each page consists of a certain type of
information or a group of controls that the application displays when the user selects
the corresponding tab.
Adding & Removing Tabs from TabControl Properties
Adding tabs Pragmatically
Removing tabs Pragmatically (tab1 was removed)
Removing All Tabs
Scroll Bar
Horizental => HScrollBar
Vertical =>VscrollBar

• AutoSize :Gets or sets a value indicating whether the ScrollBar is


automatically resized to fit its contents.
• BackColor : Gets or sets the background color for the control.
• ForeColor : Gets or sets the foreground color of the scroll bar control.
• Maximum : Gets or sets the upper limit of values of the scrollable range.
• Minimum : Gets or sets the lower limit of values of the scrollable range
• Value : Gets or sets a numeric value that represents the current position
of the scroll box
• SmallChange : Gets or sets the value to be added to or subtracted from
the Value property
• Methods of the ScrollBar Control
• OnClick
• Select
• Events of the ScrollBar Control
• Click
• DoubleClick
• Scroll
• ValueChanged
• Properties
View Box • Child : Represents the single child of a
Viewbox element.
• Stretch : Describes how content is resized to
fill its allocated space. It has value None, Fill,
Uniform, and UniformToFill.
• Stretch Direction : Gets or sets the
StretchDirection, which determines how
scaling is applied to the contents of a
Viewbox. It has values Both, DownOnly, and
UpOnly.
Thank YOU

You might also like