void initdatasource() { for (int i = 0; i < _source.Slides.Count; i++) { if (_source.Slides[i].Type == 0 ) { CoverTextSlide slide = new CoverTextSlide() { Source = _source.Slides[i] }; slide.ISlideElementSizeChanged += slide_ISlideElementSizeChanged; _contentpanel.Children.Add(slide); _elements.Add(slide); } if (_source.Slides[i].Type == 1 || _source.Slides[i].Type == 6 || _source.Slides[i].Type == 7) { LeftTextElement slide = new LeftTextElement() { Source = _source.Slides[i] }; slide.ISlideElementSizeChanged += slide_ISlideElementSizeChanged; _contentpanel.Children.Add(slide); _elements.Add(slide); } if (_source.Slides[i].Type == 2) { RigthTextElement slide = new RigthTextElement() { Source = _source.Slides[i] }; slide.ISlideElementSizeChanged += slide_ISlideElementSizeChanged; _contentpanel.Children.Add(slide); _elements.Add(slide); } if (_source.Slides[i].Type == 3) { ItemizeTextElement slide = new ItemizeTextElement() { Source = _source.Slides[i] }; slide.ISlideElementSizeChanged += slide_ISlideElementSizeChanged; _contentpanel.Children.Add(slide); _elements.Add(slide); } if (_source.Slides[i].Type == 4) { TopSlideElement elem = new TopSlideElement() ; _contentpanel.Children.Add(elem); _elements.Add(elem); //CoverTextSlide slide = new CoverTextSlide() { Source = _source.Slides[i] }; //_contentpanel.Children.Add(slide); //_elements.Add(slide); } if (_source.Slides[i].Type == 5) { QuoteTextElement slide = new QuoteTextElement() { Source = _source.Slides[i] }; slide.ISlideElementSizeChanged += slide_ISlideElementSizeChanged; _contentpanel.Children.Add(slide); _elements.Add(slide); } computeProperties(); } }
void initdatasource() { for (int i = 0; i < _source.Slides.Count; i++) { if (_source.Slides[i].Type == 0) { CoverTextSlide slide = new CoverTextSlide() { Source = _source.Slides[i] }; slide.ISlideElementSizeChanged += slide_ISlideElementSizeChanged; _contentpanel.Children.Add(slide); _elements.Add(slide); } if (_source.Slides[i].Type == 1 || _source.Slides[i].Type == 6 || _source.Slides[i].Type == 7) { LeftTextElement slide = new LeftTextElement() { Source = _source.Slides[i] }; slide.ISlideElementSizeChanged += slide_ISlideElementSizeChanged; _contentpanel.Children.Add(slide); _elements.Add(slide); } if (_source.Slides[i].Type == 2) { RigthTextElement slide = new RigthTextElement() { Source = _source.Slides[i] }; slide.ISlideElementSizeChanged += slide_ISlideElementSizeChanged; _contentpanel.Children.Add(slide); _elements.Add(slide); } if (_source.Slides[i].Type == 3) { ItemizeTextElement slide = new ItemizeTextElement() { Source = _source.Slides[i] }; slide.ISlideElementSizeChanged += slide_ISlideElementSizeChanged; _contentpanel.Children.Add(slide); _elements.Add(slide); } if (_source.Slides[i].Type == 4) { TopSlideElement elem = new TopSlideElement(); _contentpanel.Children.Add(elem); _elements.Add(elem); //CoverTextSlide slide = new CoverTextSlide() { Source = _source.Slides[i] }; //_contentpanel.Children.Add(slide); //_elements.Add(slide); } if (_source.Slides[i].Type == 5) { QuoteTextElement slide = new QuoteTextElement() { Source = _source.Slides[i] }; slide.ISlideElementSizeChanged += slide_ISlideElementSizeChanged; _contentpanel.Children.Add(slide); _elements.Add(slide); } computeProperties(); } }