RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.
Replacing a vertical scroll bar thumb with a custom path object. In this example, the scroll bar thumb is replaced by a rectangle with rounded corners and a gradient fill. Sample code for the thumb:
As the scroll bar thumb changes size proportionate to the content, the ends of the rectangle elongate into conical shapes rather than keeping their corners round.
The thumb is designed to scale along the Y-axis, rather than resize.
Resizing an object changes only the object's dimensions (width and height)
Scaling applies a transform to the object that resizes the object based on a multiple of the initial X and Y values
Insert a grid into the thumb that has one column and three rows. The first and last row will have a fixed height and the middle row will scale proportionate to the content.
In the sample below, the first and last row include a path in the shape of a semi-circle. The middle path will use a rectangle with flat ends. The same gradient is used for all three rows. Remove strokes from your paths to prevent horizontal lines appearing between the rows in your scroll bar thumb.
<!-- Set the row heights; first and last are fixed, middle row scales proportionate to the content --> <Grid.RowDefinitions> <RowDefinition Height="11"/> <RowDefinition /> <RowDefinition Height="11"/> </Grid.RowDefinitions>
See Create or Edit a control template in the Expression Blend User Guide for instructions on how to work down to the scroll bar thumb template.
MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
Artikelnummer: 953532 – Letzte Überarbeitung: 01/14/2015 12:55:55 – Revision: 2.0