using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Visifire.Gauges;

namespace Thermometer
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            // Call function to create gauge
            CreateGauge();
        }

        private void CreateGauge()
        {
            // Create a gauge
            Gauge gauge = new Gauge();
            gauge.Width = 100;
            gauge.Height = 300;

            // Set Type property in gauge 
            gauge.Type = GaugeTypes.Linear;

            // Set DefaultTemplate property in Gauge
            gauge.DefaultTemplate = DefaultTemplates.Thermometer;

            // Create a Bar Indicator
            BarIndicator indicator = new BarIndicator();
            indicator.Value = 40;

            // Add indicator to Indicators collection of gauge
            gauge.Indicators.Add(indicator);

            // Add gauge to the LayoutRoot for display
            LayoutRoot.Children.Add(gauge);
        }
    }
}