

Then set the Stroke to the color of whatever the template will be. Both the rectangle and ContentPresenter are laid out inside of a Grid.Ĭhange the names of the template components: Right-click the rectangle in the template inventory, change the Rectangle name from "" to "outerRectangle", and change "" to "m圜ontentPresenter".Īlter the rectangle so that it is empty inside (like a donut): Select outerRectangle and set Fill to "Transparent" and StrokeThickness to 5. The ContentPresenter is used to present content within the button (for example, the string "Button").

In the template editor, notice that the button is now separated into a Rectangle and the ContentPresenter. To edit the button template, right-click the button and select Edit Control Parts (Template) and then Edit Template. This template was created when we converted the rectangle into a button. Go into edit template view: To further customize the look of our button, we need to edit the button template. To edit the button template to change the button appearance In this section, you'll modify the template of the button and further customize how it looks. You now have a rectangle that has been changed to a button. When you set the values in these two boxes, the button style and template apply to all buttons within the entire application and any button you create in the application will, by default, use this template. This will make the resulting style and button template have scope over the entire application. This will make the resulting style and button template apply to all objects that are buttons. Specify the scope of the style/template: A dialog box like the following appears.įor Resource name (Key), select Apply to all. Set the values of RadiusX and RadiusY to 20.Ĭhange the rectangle into a button: Select the rectangle. Round out the corners of the rectangle: Either drag the control points of the rectangle or directly set the RadiusX and RadiusY properties. Set the Window Background property to black: Select the Window, click the Properties Tab, and set the Background property to Black.ĭraw a rectangle approximately the size of a button on the Window: Select the rectangle tool on the left-hand tool panel and drag the rectangle onto the Window.

Next, you create a rounded rectangle and convert it into a button. As you might expect, the application consists of only a blank window. Name the project CustomButton and press OK.Īt this point you have a blank WPF project. (Click Start, point to All Programs, point to Microsoft Expression, and then click Microsoft Expression Blend.) To create a new project in Expression Blend Why not start with a regular button and customize it? Because a button has built-in functionality that you do not need for custom buttons, it is easier to start with a rectangle. You then add additional shapes to the template of the button, creating a more complex looking button. To do this, you first convert a rectangle to a button. In the first part of this walkthrough you create the custom look of the custom button. The following illustration shows the customized button that you will create. See Create a Button by Using XAML for more information. If you would rather work with XAML directly, there is another walkthrough that creates the same application as this one using XAML with Visual Studio rather than Blend. KillerKeys includes the complete list of shortcuts and is updated automatically with each new release of software.Microsoft Expression Blend works by generating Extensible Application Markup Language (XAML) that is then compiled to make the executable program. These shortcuts are just a sample of the shortcuts available for this application. Synchronize files between the publishing source and the publishing destinationįind the next occurrence of the most recent searchįind the previous occurrence of the most recent searchįind the next occurrence of the current selectionįind the previous occurrence of the current selection Stop the publishing operation in progress Publish files to the publishing destination Get files from the publishing destination Learn moreĬycle through open dialog boxes in reverse order With KillerKeys, you can always have the shortcuts you want for practically any application right in front of you. Below is a list of Microsoft Expression Web 4 keyboard shortcuts.
