Exemplo n.º 1
0
        public override void PrepareGroupStyles(PlotGroupStyleCollection externalGroups, IPlotArea layer)
        {
            Processed2DPlotData pdata = GetRangesAndPoints(layer);

            if (null == _localGroups)
            {
                _localGroups = new PlotGroupStyleCollection()
                {
                    ParentObject = this
                }
            }
            ;

            using (var suspendToken = _localGroups.SuspendGetToken())
            {
                _localGroups.Clear();

                // first add missing local group styles
                _plotStyles.CollectLocalGroupStyles(externalGroups, _localGroups);

                // for the newly created group styles BeginPrepare must be called
                _localGroups.BeginPrepare();

                // now prepare the groups
                _plotStyles.PrepareGroupStyles(externalGroups, _localGroups, layer, pdata);

                // for the group styles in the local group, PrepareStep and EndPrepare must be called,
                _localGroups.PrepareStep();
                _localGroups.EndPrepare();

                suspendToken.ResumeSilently(); // we are not interested in changes in the _localGroup
            }
        }
Exemplo n.º 2
0
 public void ClearPlotItemsAndGroupStyles()
 {
     _plotItems.Clear();
     _plotGroupStyles.Clear();
     OnCollectionChanged();
 }