Beispiel #1
0
        // Override metadata so that we get property changed notifications.
        static MainWindow()
        {
            PropertyMetadata data = DataContextProperty.GetMetadata(typeof(MainWindow));

            DataContextProperty.OverrideMetadata(typeof(MainWindow),
                                                 new FrameworkPropertyMetadata(data.DefaultValue, FrameworkPropertyMetadataOptions.Inherits, OnDataContextPropertyChanged));
        }