public GettingStarted()
        {
            InitializeComponent();
            Title = AppResources.GettingStartedTitle;
            this.lblValue.Text = AppResources.Value;
            BindingContext     = new SampleViewModel()
            {
                Value = 25, ShowText = GaugeShowText.None
            };

            ValueLabel.Text            = ValueStepper.Value.ToString("N0");
            ValueStepper.ValueChanged += ValueStepper_ValueChanged;
        }
        public CustomAnimation()
        {
            InitializeComponent();
            Title = AppResources.AnimationTitle;
            model = new SampleViewModel()
            {
                Value = 60, ShowText = GaugeShowText.None, ShowRanges = false
            };
            BindingContext = model;

            radialGauge.Pointer.Thickness = 0.5;
            linearGauge.Pointer.Thickness = 0.5;
        }
Exemple #3
0
        public UsingRanges()
        {
            InitializeComponent();
            this.lblShowRanges.Text = AppResources.ShowRanges;
            Title = AppResources.UsingRangesTitle;

            BindingContext = new SampleViewModel()
            {
                Value = 25
            };

            linearGauge.Pointer.Thickness = 0.5;
            radialGauge.Pointer.Thickness = 0.5;
        }
Exemple #4
0
 public DisplayingValues()
 {
     InitializeComponent();
     Title = AppResources.DisplayingValuesTitle;
     this.lblShowText.Text      = AppResources.ShowText;
     this.showItemsPicker.Title = new OnPlatform <string>
     {
         iOS     = AppResources.ShowText,
         Android = AppResources.ShowText
     };
     BindingContext = new SampleViewModel()
     {
         Max = 1, Value = .25, Step = .01, Format = "P0", ShowRanges = false
     };
 }
Exemple #5
0
        public Direction()
        {
            InitializeComponent();
            Title                      = AppResources.DirectionTitle;
            this.lblDir.Text           = AppResources.Direction;
            this.directionPicker.Title = new OnPlatform <string>
            {
                iOS     = AppResources.DirectionTitle,
                Android = AppResources.DirectionTitle
            };
            BindingContext = new SampleViewModel()
            {
                Value = 80
            };

            directionPicker.SelectedIndexChanged += directionPicker_SelectedIndexChanged;
        }
 public BulletGraph()
 {
     InitializeComponent();
     Title               = AppResources.BulletGraphTitle;
     this.lblBad.Text    = AppResources.Bad;
     this.lblGood.Text   = AppResources.Good;
     this.lblTarget.Text = AppResources.Target;
     BindingContext      = new SampleViewModel()
     {
         Value = 72, ShowText = GaugeShowText.All
     };
     BadLabel.Text               = BadStepper.Value.ToString("N0");
     BadStepper.ValueChanged    += BadStepper_ValueChanged;
     GoodLabel.Text              = GoodStepper.Value.ToString("N0");
     GoodStepper.ValueChanged   += GoodStepper_ValueChanged;
     TargetLabel.Text            = TargetStepper.Value.ToString("N0");
     TargetStepper.ValueChanged += TargetStepper_ValueChanged;
 }
Exemple #7
0
        public AutomaticScaling()
        {
            InitializeComponent();
            Title = AppResources.AutomaticScalingTitle;
            this.lblStartAngle.Text = AppResources.StartAngle;
            this.lblSweepAngle.Text = AppResources.SweepAngle;
            BindingContext          = new SampleViewModel()
            {
                Max = 200, Value = 60, ShowText = GaugeShowText.All
            };

            StartAngleStepper.ValueChanged += OnStartAngleChanged;
            SweepAngleStepper.ValueChanged += OnSweepAngleChanged;
            StartAngleLabel.Text            = StartAngleStepper.Value.ToString("N0");
            SweepAngleLabel.Text            = SweepAngleStepper.Value.ToString("N0");
            Gauge.UpdateAnimation.Duration  = TimeSpan.FromMilliseconds(_stepDuration - 500);

            ts = new CancellationTokenSource();
        }
        public Snapshot()
        {
            InitializeComponent();
            Title = AppResources.ExportImageTitle;

            BindingContext = new SampleViewModel()
            {
                Value = 25, ShowText = GaugeShowText.All
            };
            snapshotFrameBorder.IsVisible = false;
            var tapGestureRecognizer = new TapGestureRecognizer();

            tapGestureRecognizer.Tapped += (s, e) =>
            {
                snapshotFrameBorder.IsVisible = false;
            };
            snapshotFrame.GestureRecognizers.Add(tapGestureRecognizer);
            gauge.UpdateAnimation.Duration = TimeSpan.FromMilliseconds(_stepDuration);
            this.Take.Text = AppResources.Take;
            this.Save.Text = AppResources.Save;

            this.cancellation = new CancellationTokenSource();
        }