How to grow/shrink a TextBlock (Font Size) to the available space in WPF?

The WPF Viewbox control will grow / shrink its contents to the available space: http://www.wpftutorial.net/ViewBox.html Just place your TextBlock within a ViewBox: <Viewbox Stretch=”Uniform” Width=”50″ Height=”50″> <TextBlock Text=”Test” /> </Viewbox> Of course, your Viewbox is typically scaled by its container, but hopefully you get the idea!

Disable DataGrid current cell border in FullRow selection mode

You could set the BorderThickness for DataGridCell to 0 <DataGrid … SelectionUnit=”FullRow”> <DataGrid.CellStyle> <Style TargetType=”DataGridCell”> <Setter Property=”BorderThickness” Value=”0″/> <!– Update from comments. Remove the focus indication for the selected cell –> <Setter Property=”FocusVisualStyle” Value=”{x:Null}”/> </Style> </DataGrid.CellStyle> <!– … –> </DataGrid>

Difference between ObservableCollection and BindingList

An ObservableCollection can be updated from UI exactly like any collection. The true difference is rather straightforward: ObservableCollection<T> implements INotifyCollectionChanged which provides notification when the collection is changed (you guessed ^^) It allows the binding engine to update the UI when the ObservableCollection is updated. However, BindingList<T> implements IBindingList. IBindingList provides notification on collection changes, … Read more