コード例 #1
0
        public EditItemDialog()
        {
            this.InitializeComponent();

            this.ItemTypes = ItemDefinition.GetDefinitions();

            // Todo - be smarter about this.
            this.AvailableThermometers = new[] { 1, 2, 3, 4, 5, 6 };

            if (GalaSoft.MvvmLight.ViewModelBase.IsInDesignModeStatic)
            {
                var defs = ItemDefinition.GetDefinitions();
                this.Item = new BbqItemViewModel
                {
                    Name = "Butt 1",
                    TargetTemperature = defs[0].DefaultTargetTemperature,
                    Definition        = defs[0],
                    Weight            = 8.2
                };
            }

            this.Closing += OnClosing;
        }