コード例 #1
0
 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;
 }
コード例 #2
0
ファイル: StarButton.cs プロジェクト: Orochi4268/Aurora.Music
        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;
        }