Ejemplo n.º 1
0
        public TemplateView(ITemplatePresentationModel model, IShell shell)
        {
            this.shell       = shell;
            this.DataContext = model;
            InitializeComponent();
            model.View = this;

            var animations      = EnumDataSource.FromType <VideoTextAnimations>();
            var animationColumn = textGridView.Columns[5] as GridViewComboBoxColumn;

            animationColumn.ItemsSource = animations;
        }
Ejemplo n.º 2
0
        public LoadAnimation()
        {
            InitializeComponent();

            _cbTrans.ItemsSource   = EnumDataSource.FromType <AnimationTransform>();
            _cbTrans.SelectedIndex = 1;

            _cbOrigin.ItemsSource   = EnumDataSource.FromType <AnimationOrigin>();
            _cbOrigin.SelectedIndex = 1;

            _cbEasing.ItemsSource   = EnumDataSource.FromType <Easing>();
            _cbEasing.SelectedIndex = 0;

            _chart.Tapped += (s, e) => NewData();
            _chart.Loaded += (s, e) => NewData();
        }
Ejemplo n.º 3
0
        public AggregateChart()
        {
            InitializeComponent();

            _dict["red"]    = CreateBrush(Colors.Red);
            _dict["blue"]   = CreateBrush(Color.FromArgb(255, 2, 150, 252));
            _dict["yellow"] = CreateBrush(Colors.Yellow);

            _cb.ItemsSource       = EnumDataSource.FromType(typeof(Aggregate));
            _cb.SelectedIndex     = 0;
            _cb.SelectionChanged += (s, e) => _chart.Aggregate = (Aggregate)((EnumMember)_cb.SelectedItem).Value;

            int cnt = 30;

            _chart.Data.ItemNames = CreateRandomStrings(cnt, new string[] { "blue", "red", "yellow" });;

            var vals = CreateRandomValues(cnt);

            var ds = new DataSeries()
            {
                ValuesSource = vals
            };

            ds.PlotElementLoaded += (s, e) =>
            {
                PlotElement pe = (PlotElement)s;
                if (_dict.ContainsKey(pe.DataPoint.Name))
                {
                    pe.Fill = _dict[pe.DataPoint.Name];
                }
                pe.StrokeThickness = 0;
            };

            _chart.Data.Children.Add(ds);
            _chart.View.AxisX.AnnoVisibility = AnnoVisibility.ShowAll;
            BarColumnOptions.SetRadiusX(_chart, 4);
            BarColumnOptions.SetRadiusY(_chart, 4);
        }