using FLY.Thick.FilmCasting.IService;
using Misc;
using System.Windows;
using System.Windows.Controls;

namespace FLY.Thick.FilmCasting.UI.Server
{
    /// <summary>
    /// ColumnRangeScanGraph.xaml 的交互逻辑
    /// </summary>
    public partial class ScanGraph : UserControl
    {
        public ScanGraph()
        {
            InitializeComponent();
        }

        public void Init(
            ScanGraphVm viewModel)
        {
            this.DataContext = viewModel;

        }
        public void Update(int width, int height) 
        {
            Width = width;
            Height = height;
            Measure(RenderSize);
            Arrange(new System.Windows.Rect(new System.Windows.Point(0, 0), RenderSize));
            chart.Update(true, true); //force chart redraw
            UpdateLayout();
        }
    }
}
