Workaround for WPF Freezable bug?

To workaround this .net bug, change all of the Solid Color Brushes in your code to be freezeable. For example <SolidColorBrush x:Key=”WindowBackground” Color=”Black” /> should be changed to: <SolidColorBrush po:Freeze=”True” x:Key=”WindowBackground” Color=”Black” />. For more detailed instructions see here: How can WPF objects deriving from Freezable be frozen in XAML?.

How can WPF objects deriving from Freezable be frozen in XAML?

To freeze a Freezable object declared in markup, you use the Freeze attribute defined in XML namespace http://schemas.microsoft.com/winfx/2006/xaml/presentation/options. In the following example, a SolidColorBrush is declared as a page resource and frozen. It is then used to set the background of a button. <Page xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” xmlns:po=”http://schemas.microsoft.com/winfx/2006/xaml/presentation/options” xmlns:mc=”http://schemas.openxmlformats.org/markup-compatibility/2006″ mc:Ignorable=”po”> <Page.Resources> <!– This brush is frozen … Read more

How to Freeze First Column of WPF DataGrid [duplicate]

Set the DataGrid’s FrozenColumnCount=”1″. <DataGrid FrozenColumnCount=”1″ Name=”dgQuestionTemplate” HorizontalAlignment=”Left” Grid.Row=”1″ Width=”870″ HorizontalScrollBarVisibility=”Auto” IsReadOnly=”False”> Frozen columns are columns that are always displayed and cannot be scrolled out of visibility. Frozen columns are always the leftmost columns in display order. You cannot drag frozen columns into the group of unfrozen columns or drag unfrozen columns into the group … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)