/// <summary> /// Called when this watchface application is launched /// </summary> protected override void OnCreate() { base.OnCreate(); _viewModel = new WatchViewModel(); _classicWatch = new ClassicWatchApplication(_viewModel); _classicWatch.BindingContext = _viewModel; LoadWatchface(_classicWatch); _initialized = false; _viewModel.Time = GetCurrentTime().UtcTimestamp; Console.WriteLine($"OnCreate Time.ToString:{_viewModel.Time.ToString()}"); _classicWatch.MoveHands(); }
/// <summary> /// Constructor of ClassicWatch Application /// </summary> /// <param name="viewModel">WatchViewModel</param> public ClassicWatchApplication(WatchViewModel viewModel) { _viewModel = viewModel; InitializeComponent(); BindingContext = viewModel; }