コード例 #1
0
        private static void OnComparisonModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            FinancialSeriesBase financialSeries = d as FinancialSeriesBase;

            if (financialSeries.Segments != null)
            {
                financialSeries.Segments.Clear();
                financialSeries.UpdateArea();
            }
        }
コード例 #2
0
        private static void OnBullFillColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            FinancialSeriesBase financialSeries = d as FinancialSeriesBase;

            if ((financialSeries is FastCandleBitmapSeries) || (financialSeries is FastHiLoOpenCloseBitmapSeries))
            {
                financialSeries.UpdateArea();
            }
            else
            {
                foreach (ChartSegment segment in financialSeries.Segments)
                {
                    if (segment is CandleSegment)
                    {
                        (segment as CandleSegment).BullFillColor = financialSeries.BullFillColor;
                    }
                    else if (segment is HiLoOpenCloseSegment)
                    {
                        (segment as HiLoOpenCloseSegment).BullFillColor = financialSeries.BullFillColor;
                    }
                }
            }
        }