protected override void OnApplyTemplate() { base.OnApplyTemplate(); Icon = GetTemplateChild("Icon") as FontIcon; Root = GetTemplateChild("RootGrid") as Grid; Icon.Glyph = string.IsNullOrWhiteSpace(IconSymbol) ? "\uE00B" : IconSymbol.First().ToString(); Bloom = GetTemplateChild("Bloom") as Ellipse; }
protected override void OnApplyTemplate() { base.OnApplyTemplate(); Icon = GetTemplateChild("Icon") as FontIcon; Root = GetTemplateChild("Root") as Grid; Icon.Glyph = string.IsNullOrWhiteSpace(IconSymbol) ? "\uE00B" : IconSymbol.First().ToString(); Bloom = GetTemplateChild("Bloom") as Ellipse; Root.PointerEntered += Root_PointerEntered; Root.PointerExited += Root_PointerExited; Root.PointerCanceled += Root_PointerExited; Root.PointerCaptureLost += Root_PointerExited; Root.PointerReleased += Root_PointerReleased; Root.PointerPressed += Root_PointerPressed; }