Questions tagged [contenttemplate]
46 questions
4
votes
2 answers
Wpf TabControl create only one view at all tabs
TabControl's ItemsSource property binded to collection in the ViewModel. ContentTemplate is ListView - UserControl. All the tabs use only one ListView control (the constructor of ListView is called only once). The problem is that all tabs have a…

Vadim Moskvin
- 51
- 3
2
votes
1 answer
ItemsControl with multiple ItemTemplateSelector
I have this ScrollViewer:
I fill the…

imj
- 472
- 1
- 8
- 24
2
votes
1 answer
VsBrush doesn't work in WPF ResourceDictionary
tl;dr
Problem description
First of all, I'm new to WPF and I have little to now idea what I'm doing...
I'm developing a Visual Studio 2013 Extension in which I create a custom Tool Window. Since the WPF controls don't inherit themes from parent…

Shakaron
- 1,027
- 10
- 24
1
vote
1 answer
TabControl - Keeping UserControl TabItems in Memory When Switching Tabs
I had a tab control where each tab item was a custom made user control. The issue there was whenever the program would launch, each individual control would be initialized and loaded. Then, when switching to the tab, it would have to reload…

ConfusedAboutXAML
- 43
- 3
1
vote
1 answer
Set Diffrent DataContext to an Element in a ControlTemplate in WPF
I can't get any further.
My structure looks like this:
ViewModel (Class)
Property Number (Class, iValue)
Value, InputValidationInfo, etc.
Property Icon (Class, iValue)
Value, InputValidationInfo, etc.
The…

hilrol
- 57
- 6
1
vote
1 answer
XAML separate binding of ContainerStyle and ContentTemplate in ListBox
I tried this for a while now and searched in the web without success... Now I dare to ask on stackoverflow myself.
So, the aim is to separate the definitions of the ItemContainerStyle and the ContentTemplate of a ListBoxItem. I have defined the…

Matroid
- 215
- 2
- 11
1
vote
1 answer
C# WFP Find control in control template of a control with override DefaultStyleKeyProperty
I have downloaded an example solution that uses the OverrideMetadata method of DefaultStyleKeyProperty of a control that inherits from usercontrol but does not have an .xaml design file, and that is going to be base control for other subcontrols…

Yakumo Fujii
- 69
- 8
1
vote
1 answer
Wpf Style for tooltip isn't applied
I have this situation:
I defined a style for a tooltip of my custom component: