Пример #1
0
        public override void Dispose()
        {
            base.Dispose();

            DisposeTextBlock(TextBlock1);
            TextBlock1 = null;
            DisposeTextBlock(TextBlock2);
            TextBlock2 = null;
            DisposeTextBlock(TextBlock3);
            TextBlock3 = null;
            DisposeTextBlock(TextBlock4);
            TextBlock4 = null;
            DisposeTextBlock(TextBlock5);
            TextBlock5 = null;
            DisposeTextBlock(TextBlock6);
            TextBlock6 = null;
            DisposeTextBlock(TextBlock7);
            TextBlock7 = null;

            Button1.Click -= Button_Click_1;
            DisposeButton(Button1);
            Button1 = null;

            BarChart.ClearValue(Grid.BackgroundProperty);
            BarChart.ClearValue(Grid.PaddingProperty);
            BarChart.Children.Clear();
            BarChart.ColumnDefinitions.Clear();
            BarChart.RowDefinitions.Clear();
            BarChart = null;
        }