Advanced
RSS
Join
Login
Home
News
Submit News
Articles
Announcements
Products
Controls
Media Players
Games
Charts
Tools
Moonlight
Demos
Learn
Videos
Presentations
Tutorials
Resources
Samples
QuickStarts
Tips and Tricks
Issues
Misc
White Papers
Write and Win Contests
16 Dec 08 - 31 Jan 09
18 Aug 08 - 28 Sep 08
Guidelines
About the Contest
Submit Article
Tips
General
Expression Blend
Visual Studio
Tools
Styles and Templates
Binding
Resources
Controls and UI
Connectivity
Media
Submit Tip
Shows
Showcase
Submit Showcase
Get Started
Books
Silverlight 4
Silverlight 3
Silverlight 2
Silverlight 1.0
Expression Blend
Design
XAML
Advanced Topics
Submit Book
Events
Submit Event
Jobs
Design
IT Management
Testing/QA
Development
Project Managemen
Other
Post Job
Community
About
Newsletter Issue #1
Newsletter Issue #2
Terms of Use
Contact
Site Map
Need Silverlight Development?
Advertise on SilverlightShow
Follow us on Twitter
Facebook
Newsletter
Recommended
Completit.com - the challenges behind building a corporate website in Silverlight
Silverlight for Windows Phone
ModalDialogs, IEditableObject and MVVM in Silverlight 4
Capturing the Webcam in Silverlight 4
Win a SilverlightShow T-shirt!
Business applications
Building N-Tier business applications with WCF RIA Services – Part II
Building N-Tier business applications with .NET RIA Services – Part I
Building a Silverlight Line-Of-Business Application – Styling Part 7.2
More
Design Patterns
Patterns and practices in the Composite Application Library – part 3
Patterns and practices in the Composite Application Library – part 2
Patterns and practices in the Composite Application Library – part 1
More
Book
Show more books
Home
/
Search
Search
Keywords
Search in:
title & content
tags
(exact match)
Find results
with
all
of the words
with the
exact phrase
with
at least one
of the words
Publish date range (mm/dd/yyyy)
from
to
Search in
News
Articles
Tips
Shows
Showcase
Books
Results Per Page
10
20
30
40
50
Show advanced search options
Found
1
result for
Caret
.
Date between:
<not defined>
and
<not defined>
Search in:
News
,
Articles
,
Tips
,
Shows
,
Showcase
,
Books
Order by
Publish Date
|
Title
|
Rating
How to style the caret in Silverlight 3
1 comments
/ posted by
Nikolay Raychev
on Mar 25, 2009 (more than a year ago)
Tags:
Caret
,
CaretBrush
,
Silverlight
,
XAML
,
Nikolay Raychev
,
Silverlight 3
It's very easy to style the caret in
Silverlight 3
. Look at that huge
TextBox
with a caret in the rainbow colors:
You just need to set the
CaretBrush
property:
<
TextBox
FontSize
=
"50"
Width
=
"100"
Height
=
"80"
>
<
TextBox.RenderTransform
>
<
ScaleTransform
ScaleX
=
"6"
ScaleY
=
"1"
/>
</
TextBox.RenderTransform
>
<
TextBox.CaretBrush
>
<
LinearGradientBrush x:
Name
=
"backgroundLinearGradientBrush"
MappingMode
=
"RelativeToBoundingBox"
StartPoint
=
"0,0"
EndPoint
=
"0,1"
>
<
LinearGradientBrush.GradientStops
>
<
GradientStop
Color
=
"Red"
Offset
=
"0"
/>
<
GradientStop
Color
=
"Orange"
Offset
=
"0.167"
/>
<
GradientStop
Color
=
"Yellow"
Offset
=
"0.333"
/>
<
GradientStop
Color
=
"Green"
Offset
=
"0.5"
/>
<
GradientStop
Color
=
"Blue"
Offset
=
"0.667"
/>
<
GradientStop
Color
=
"Indigo"
Offset
=
"0.833"
/>
<
GradientStop
Color
=
"Violet"
Offset
=
"1"
/>
</
LinearGradientBrush.GradientStops
>
</
LinearGradientBrush
>
</
TextBox.CaretBrush
>
</
TextBox
>
You can use any
Silverlight
supported
Brush
.
Help us make SilverlightShow even better and win a free
t-shirt
.
Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to
hear from you
! Need a material (
article
,
tutorial
, or other) on a specific topic?
Let us know
and SilverlightShow content authors will work to have that prepared for you. (
hide this
)