Zum Hauptinhalt springen

Automatically grayed Image in WPF

The following class is a WPF image control which is directly derived from Image. Therefore it can be used out-of-the-box like the standard WPF Image control. The image will automatically change to a gray scale image when the IsEnabled property of the control is set to false. The AutoGrayableImage can be used in within any […]

Use Text Wrapping in a WPF DataGrid Text...

You can simply use styles to enable text wrapping in a WPF DataGrid Column. This sets the element style of the standard column control and of the column control that is used when the cell is in edit mode. <DataGridTextColumn> <DataGridTextColumn.ElementStyle> <Style TargetType=“TextBlock“> <Setter Property=“TextWrapping“ Value=“WrapWithOverflow“/> <Setter Property=“TextTrimming“ Value=“WordEllipsis“/> </Style> </DataGridTextColumn.ElementStyle> <DataGridTextColumn.EditingElementStyle> <Style TargetType=“TextBox“> <Setter […]