Questions tagged [implicit-style]
10 questions
19
votes
3 answers
Why does an implicit TextBlock style get applied when binding Label.Content to a non-string, but not a string?
I was looking at this question, and discovered that binding Label.Content to a non-string value will apply an implicit TextBlock style, however binding to a string does not.
Here's some sample code to reproduce the problem:
…

Rachel
- 130,264
- 66
- 304
- 490
6
votes
1 answer
Implicit Styles not working on Custom Controls
In my App.xaml I have a few implicit styles
These styles work for control as long as they are not in a custom control I create.
My Control
public class NavigationControl : Control
{
…

MyKuLLSKI
- 5,285
- 3
- 20
- 39
4
votes
1 answer
Expression Blend, an ItemTemplate and an Implicit Style
I'm having an issue with Blend not rendering items in a DataTemplate styled implicity.
I've setup a basic project to replicate the issue. Below is the Xaml + ResourceDictionary for those with Eagle eyes to see what I'm doing wrong (if anything) and…

gaz
- 80
- 5
4
votes
2 answers
Silverlight 4 - How can I change button background color when focused with an Implicit button style?
I'm having a great deal of difficulty trying to achieve something that should be trivial. I'm using an Implicit Button Style defined in a global XAML resource file. I just want to change the background color of the focused button to red with a…

James
- 12,636
- 12
- 67
- 104
3
votes
1 answer
Silverlight - implicit style inheritance problem
If I have a subclass of ContextMenu (for example) called MyContextMenu and I define a style in my MergedDictionaries with TargetType=ContextMenu, why does this style not apply to instances of MyContextMenu?
It does work for all of the instances of…

Kir
- 2,905
- 2
- 27
- 44
3
votes
1 answer
Implicit Style Within Container
I want to apply Padding="0" to each Label on the left sidebar (the first StackPanel) so that it left-aligns with each TextBox (and other controls).
How can I define an implicit style in which only applies to elements within a…

Steven
- 13,501
- 27
- 102
- 146
2
votes
1 answer
How can I stop an implicit TextBox style from getting inherited in a ComboBox when DisplayMemberPath is not set?
I have two ComboBoxes. One is bound to a list of enum values, while the other is bound to a list of custom class objects and has the DisplayMemberPath property set.
The ComboBox bound to the enum values applies an implicit TextBlock style, while the…

Rachel
- 130,264
- 66
- 304
- 490
1
vote
1 answer
XAML global style with gradient as background
You can set a gradient background inside the xaml for a page like this

JoeTaicoon
- 1,383
- 1
- 12
- 28
0
votes
1 answer
Implicit styling of a container window
I am developing an application, having a window container consisting of child user controls.
I have a MyStyles.xaml document which is being used by individual user controls and their children at the control level.
That is, I am declaring the styles…

aromore
- 977
- 2
- 10
- 25
0
votes
2 answers
WPF Skinning with different system themes
Our WPF application has several UI skins that can be switched at runtime and be applied to specific framework element and it's children. Skin is compiled xaml resource dictionary that is stored in Theming dll, Skinning is implemented by using custom…

Aloraman
- 1,389
- 1
- 21
- 32