Top "Controltemplate" questions

The ControlTemplate allows you to specify the visual structure of a control.

Style.Triggers vs ControlTemplate.Triggers

When should I choose Style.Triggers and when should I choose ControlTemplate.Triggers? Are there any benefits using one over …

c# wpf xaml styles controltemplate
How to place a ScrollViewer on top of the content it should scroll

I would like to put my ScrollViewer in such a way that it overlaps/sits on top of the content …

wpf scrollbar controltemplate styling scrollviewer
WPF: Bind to command from ControlTemplate

I am trying to add a button to a custom ListView (MyListView) which triggers a command (MyCustomCommand) defined in MyListView. …

wpf binding command controltemplate
DataContext as Source for Converter Binding Within Resources

<Canvas.DataContext> <ViewModels:VMSomeControl Model="{Binding RelativeSource={RelativeSource TemplatedParent}}" /> </Canvas.DataContext> <!-- DataContext …

wpf binding datacontext controltemplate ivalueconverter
How is TemplateBinding working in UserControl Template?

I am new one to create UserControl and now I am trying to customize the UserControl Template as below: <…

wpf xaml user-controls controltemplate templatebinding
In a button's control template, how can I set the color of contained text?

Using Silverlight 4 & WPF 4, I'm trying to create a button style that alters the text color of any contained text …

wpf silverlight button controltemplate visualstatemanager
ControlTemplate with DataTrigger Vs. DataTemplate with DataTemplateSelector

I have a generic control which displays an editor based on the type property inside a ViewModel. Currently it's implemented …

wpf datatemplate controltemplate datatrigger datatemplateselector
WPF set named style elements from code behind?

I have a user control that applies a style to button, with the style containing a ControlTemplate section. Within the …

wpf styles controltemplate
How to change control template from Style.Triggers

I've done it this way: <Style x:Key="Button" BasedOn="{StaticResource LoginButton}" TargetType="Button"> <Setter Property="Template"&…

wpf triggers styles controltemplate
WPF Trigger animation when Visibility is changed?

Well i have a custom control and when Visibility is changed to Visible I have a Trigger with a enter/…

wpf xaml animation triggers controltemplate