public void ShowSnapshot(SnapshotViewModel snapshot) { var element= new BalloonView() { DataContext = snapshot, HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Stretch }; TaskbarIconMain.ShowCustomBalloon(element, PopupAnimation.Fade, 5000); }
private void GetSnapshot() { var snapshot = _provider.GetSnapshot(); if (snapshot != null) { DispatcherHelper.CheckBeginInvokeOnUI(() => { var snapshotViewModel = new SnapshotViewModel(_provider.Name, snapshot, _previouSnapshot); //Add this to the history view this.Snapshots.Insert(0, snapshotViewModel); _previouSnapshot = snapshot; //Use this for the current display CurrentSnapshot = snapshotViewModel; //Show the snapshot this.NotifyService.ShowSnapshot(snapshotViewModel); }); } var breakdowns = _provider.BreakdownProviders.Select( p => new BreakdownViewModel(p.Name, p.GetBreakdown())); DispatcherHelper.CheckBeginInvokeOnUI(() => { this.Breakdowns.Clear(); foreach (var breakdown in breakdowns) { _breakdowns.Add(breakdown); } }); }