Questions tagged [controltemplates]
36 questions
28
votes
1 answer
adjust border on one specific side
I'm using a controlTemplate of the ListBox to show a collection.
I want to display all the items with a border like in a grid (all lines same size).
When I give every listBoxItem a border, the line between 2 items has a double size.
(made from…

Jowen
- 5,203
- 1
- 43
- 41
26
votes
5 answers
Styling a WPF layout grid background (of each cell, row, column)
I would like to know if there is any way to style a WPF layout grid's cells, rows and columns. I've been trying to find any information and the few mentions I've found have not been that informative.
I would like to style the grid to look like the…

Mladen Mihajlovic
- 6,095
- 7
- 40
- 55
17
votes
4 answers
Expander button on the right side: how to do it?
i want to position the Expander button on the right side of the label. How to do this?

Sender
- 6,660
- 12
- 47
- 66
15
votes
1 answer
Creating an image+text button with a control template?
I am tired of creating the same image+text button over and over again, and I would like to move the markup to a control template. Here is my problem: I need to provide template bindings to add the image and text to the templated button, and the…

David Veeneman
- 18,912
- 32
- 122
- 187
10
votes
3 answers
How do I include a custom row at the end of a DataGrid in Silverlight?
I have a DataGrid in my Silverlight application and it works nicely, adding a row or removing a row as I manipulate the ItemsSource collection. However, I want there to be an additional row, or control that always appears after the last data row.
I…

Jeff Yates
- 61,417
- 20
- 137
- 189
6
votes
5 answers
ASP/C# code behind can not reach control from markup
Issue:
I have a markup like this (only the important lines):
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RTDeluxe.ascx.cs"
Inherits="MainSolution.CONTROLTEMPLATES.Kunde.RTDeluxe" %>
6
votes
3 answers
WPF Styles/Template inheritance
I'm trying to learn WPF at the moment, and looking into making the default .Net control look different through the use of style. Using C# as my preferred language although all the code below is WPF markup.
I setup gmail today with the new theme,…

JonWillis
- 3,146
- 5
- 32
- 54
4
votes
1 answer
How do I bind to the SelectedItem property in a ControlTemplate?
Consider the following Control/Template

Mark Carpenter
- 17,445
- 22
- 96
- 149
4
votes
1 answer
SharePoint does not find my custom RenderingTemplate
So I've created a custom RenderingTemplate and deployed it to CONTROLTEMPLATES\MyControlTemplates\
It basically dictates how a custom content type that i've created should be rendered when displayed. For that I've added this:

mortenbpost
- 1,687
- 16
- 22
3
votes
1 answer
change content button with trigger
I want change the content of the button to another image when it is pressed but nothing happens.
3
votes
3 answers
WPF Style Triggers TemplateBinding
I'm new to WPF and I am struggling to find the solution to what I'm trying to do as I'm still a little uncertain as to whether I'm doing this correctly.
I have the following style defined for a button