controltemplates

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: <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms"&gt; <Display>CustomDispF...

Accessing TemplatePart without changing ControlTemplate?

hi there, i wonder if there is a way to access a control's templatepart from within c# for modifying the part (e.g. hiding, etc..). is it possible to get a reference to the part with pure c#? i don't want to touch the controls template. thanks j. ...

How could I implement this strange WPF TreeListDataGridView?

As you can see in the image below I have a tree datamodel consisting of groups that can contain other groups plus an arbitary number of items wich again can hold Parameters. The Parameters itself are defined globally and just reoccur in the items. Only the parameter's actual value may differ from parameter usage to parameter usage in the...

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 the bottom border of the first item, and the top border of the second item) So the question...

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 can get the additional control to appear after the last row using a ControlTemplate and s...

Setting Properties of Control Templates in XAML

I've created a button control template where I want to change the glow color of the button on the xaml level. Here is what I mean. <Button x:Name="btnClose" Template="{DynamicResource GlassButton}" Width="32" Height="32" GlowStartColor="Red" GlowEndColor="DarkRed">Button1</Button> The GlowStartColor and GlowEndColor are the propertie...

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 one in the linked screenshot. If the actual control does not support it, can I inherit it...

WPF ControlTemplate How to

I am very new to WPF, about 4 hours new. I am coming from ASP.net and Masterpages. I was looking at examples of Control Template that can used to template a window so all windows look the same. Other post Can some direct me to an example of how it is accomplished or sample code from start to finish? Second part: Is the ControlTemplat...

How do I bind to the SelectedItem property in a ControlTemplate?

Consider the following Control/Template <my:ExpandingListBox Margin="0,2,0,0" x:Name="TagSearchListBox"> <my:ExpandingListBox.Template> <ControlTemplate TargetType="{x:Type my:ExpandingListBox}"> <Border Name="MyBorder" BorderThickness="2" BorderBrush="Black"> <Grid> <TextBlock...

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 Button control doesn't seem to have properties that I can bind to. My template looks like thi...

WPF ComboBox ControlTemplate Background problem

This is an example of a ComboBox's ControlTemplate. CLICK HERE I've tried to set the Background / add a trigger to change the background when the ComboBox is focused (with a tab key for example), both without success. I don't even understand why it isn't included by default ! (compared to the original generic template) ...

Scrolling list items in wpf

I guess the following picture depicts the problem better than texts... That is what I need. <ListBox x:Name="NamesListBox" ItemsSource="{Binding}"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel x:Name="ItemWrapPanel"> <WrapPanel.RenderTransform> <TranslateTransform ...

How to draw complex shape from code behind for custom control in resource dictionary

Hi I am new to wpf and am having a problem which may or may not be trivial. I have defined a custom control as follows in the resource dictionary: <ResourceDictionary x:Class="SyringeSlider.Themes.Generic" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml...

How to make the selected TabItem look attached to the rest of the document

I have a WPF app with a few Tabs. I'm now messing around with styling and have for example changed the ControlTemplate so I now have to define everything about the TabItem. Now the TabItem that is selected seems detached from the document below because of some thin line around that content (there is no border). I'm not sure what techniq...

ASP.NET Custom Templated Control - Is there a way to modify where databound data is output to?

Basically, I have a custom templated control with a custom data container class. When a developer adds an instance of my control to a page, they can define the controls in the LayoutTemplate however they like, as follows: <ml:MyControl id="MyControl1" runat="server"> <LayoutTemplate> <span><%#Container.ErrorMessa...