public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/Run21;component/UserControls/SlotControl.xaml", System.UriKind.Relative)); this.MainRoot = ((System.Windows.Controls.Canvas)(this.FindName("MainRoot"))); this.theBorder = ((System.Windows.Controls.Border)(this.FindName("theBorder"))); this.LayoutRoot = ((System.Windows.Controls.Canvas)(this.FindName("LayoutRoot"))); this.scorePopper1 = ((Run21.UserControls.ScorePopper)(this.FindName("scorePopper1"))); this.bustControl = ((Run21.BustControl)(this.FindName("bustControl"))); }
private static void OnScoreChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { ScorePopper p = d as ScorePopper; p.Pump.Begin(); p.scoreTextBlock.Text = p.HandScore.ToString(); if (p.HandScore > 21) { p.BustedAnimation.Begin(); } }