Whats the difference between ContentControl.Template and ContentControl.ContentTemplate

Template property defines the appearence of a Control itself and ContentTemplate defines the template of the Content area of a Control. Interesting point from MSDN: If a Control does not have a ControlTemplate, the Control will not appear in your application. This becomes more clear when we take a look at the data types of … Read more

Declaring Text Decorations such as Underline, Strikethrough in a Style

Underlining text can be done either with <Underline>…</Underline> or with the TextDecorations attribute set to Underline. You can include the latter in a style definition: <Style x:Key=”Underlined”> <Setter Property=”TextBlock.TextDecorations” Value=”Underline” /> </Style> <TextBlock Style=”{StaticResource Underlined}”> Foo </TextBlock>

How can I bind a xaml property to a static variable in another class?

First of all you can’t bind to variable. You can bind only to properties from XAML. For binding to static property you can do in this way (say you want to bind Text property of TextBlock) – <TextBlock Text=”{Binding Source={x:Static local:YourClassName.PropertyName}}”/> where local is namespace where your class resides which you need to declare above … Read more

Make ScaleTransform start from Center instead of Top-Left Corner

You can set RenderTransformOrigin to “0.5, 0.5″ <Style x:Key=”sizeButton” TargetType=”Button”> <Setter Property=”RenderTransformOrigin” Value=”0.5, 0.5″/> <Style.Triggers> <Trigger Property=”IsMouseOver” Value=”True”> <Setter Property=”RenderTransform”> <Setter.Value> <ScaleTransform ScaleX=”1.5″ ScaleY=”1.5″/> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style>

WPF Combobox DefaultValue (Please Select)

All good answers that has been supplied, but I used the following to solve my problem <ComboBox SelectedIndex=”0″> <ComboBox.ItemsSource> <CompositeCollection> <ListBoxItem>Please Select</ListBoxItem> <CollectionContainer Collection=”{Binding Source={StaticResource YOURDATASOURCE}}” /> </CompositeCollection> </ComboBox.ItemsSource> </ComboBox> Thanks for everyone who has helped!