Custom control library Daisy. WP7.Controls1.2

Source: Internet
Author: User

The Daisy. WP7.Controls custom control library adds four new controls in this version 1.2: EnhancedTextBlock control, TabControl control, TextBubble control, and InputBubble control.

1. EnhancedTextBlock control: This control can add a shadow to the displayed text, italic text, bold text, color change, font size, and so on.

Main attributes:

IsShowShadow: whether to display the shadow effect.

Shadow: Shadow color.

EnhancedFontSize: Specifies the font size.

EnhancedFontFamily: Specifies the font of a highlighted word.

EnhancedFontStyle: Specifies the style that emphasizes words.

EnhancedFontWeight: The highlighted words in bold.

Background: Set the control Background color.

Sample Code:

<My: enhancedTextBlock placement = "Right" EnhancedForground = "Red" IsShowShadow = "True" Shadow = "Yellow" EnhancedFontSize = "25" FontSize = "40" Foreground = "White" Background = "Gray "Name =" enhancedTextBlock1 "verticalignment =" Top "Height =" 116 "Width =" 400 "Margin =, 45, 0 ">

Effect:

2. TabControl: this control is similar to the privot control, but it cannot be moved. It can also change the title size, customize any effect, and customize the Item header size and any effect.

Sample Code:

<My: TabControl Grid. row = "1" Height = "332" Title = "MyTabControl" HorizontalAlignment = "Left" Name = "tabControl1" verticalignment = "Top" Width = "480">
<My: TabItem Header = "Item1">
<My: TabItem. SelectedHeaderTemplate>
<DataTemplate>
<Rectangle Stroke = "Black" StrokeThickness = "2" Width = "100" Height = "60" Fill = "Red"/>
</DataTemplate>
</My: TabItem. SelectedHeaderTemplate>
<My: TabItem. UnselectedHeaderTemplate>
<DataTemplate>
<Rectangle Stroke = "Black" StrokeThickness = "2" Width = "100" Height = "55" Fill = "LightGray"/>
</DataTemplate>
</My: TabItem. UnselectedHeaderTemplate>
<Rectangle VerticalAlignment = "Top" Width = "400" Height = "100" Fill = "Red"/>
</My: TabItem>
<My: TabItem Header = "Item2">
<My: TabItem. SelectedHeaderTemplate>
<DataTemplate>
<Rectangle Stroke = "Black" StrokeThickness = "2" Width = "100" Height = "60" Fill = "Blue"/>
</DataTemplate>
</My: TabItem. SelectedHeaderTemplate>
<My: TabItem. UnselectedHeaderTemplate>
<DataTemplate>
<Rectangle Stroke = "Black" StrokeThickness = "2" Width = "100" Height = "55" Fill = "LightGray"/>
</DataTemplate>
</My: TabItem. UnselectedHeaderTemplate>
<Rectangle VerticalAlignment = "Top" Width = "400" Height = "100" Fill = "Blue"/>
</My: TabItem>
<My: TabItem Header = "Item3">
<My: TabItem. SelectedHeaderTemplate>
<DataTemplate>
<Rectangle Stroke = "Black" StrokeThickness = "2" Width = "100" Height = "60" Fill = "Green"/>
</DataTemplate>
</My: TabItem. SelectedHeaderTemplate>
<My: TabItem. UnselectedHeaderTemplate>
<DataTemplate>
<Rectangle Stroke = "Black" StrokeThickness = "2" Width = "100" Height = "55" Fill = "LightGray"/>
</DataTemplate>
</My: TabItem. UnselectedHeaderTemplate>
<Rectangle VerticalAlignment = "Top" Width = "400" Height = "100" Fill = "Green"/>
</My: TabItem>
</My: TabControl>

Effect:

3. TextBubble control: This is a TextBlock that looks like a square bubble. It can change the left and right directions of bubbles.

Main attributes:

Background: Set the Background color of the control.

Foreground: Set the font color.

Orientation: Set the bubble direction.

Sample Code:

<My: TextBubble Grid. row = "2" Background = "Wheat" Text = "inline" Foreground = "Black" HorizontalAlignment = "Left" Margin = "35, 39, 300 "Name =" textBubble1 "verticalignment =" Top "Width =" "/>

 

4. InputBubble control: This is a TextBox like a square bubble. It can change the left and right directions of bubbles.

Main attributes:

Background: Set the Background color of the control.

Foreground: Set the font color.

Orientation: Set the bubble direction.

LimitedHeight: maximum height. After this value is set, the control can wrap automatically.

Sample Code:

<My: InputBubble Grid. row = "3" Background = "Wheat" Orientation = "Right" HorizontalAlignment = "Right" LimitedHeight = "100" Name = "inputBubble1" verticalignment = "Top" Width = "300" />

 

The display effects of the two controls:

 

Sample Code and control library address: http://www.52winphone.com/bbs/viewthread.php? Tid = 748 & extra = page % 3D1

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.