Here is my sample UWP code in C# and XAML Where i created one hyperlink button in MainPage method and set the style attributes like foreground and background.
Now i want to change the background and foreground colors when PointerEntered event triggered like mouseover, in this case only font size is changing but not the colors
public MainPage(){
this.InitializeComponent();
var hLinkButton = new HyperlinkButton();
hLinkButton.Name = "LearnMoreHyperLink";
hLinkButton.Content = "Learn More...";
hLinkButton.Background = new SolidColorBrush(Colors.Red);
hLinkButton.Foreground = new SolidColorBrush(Colors.White);
hLinkButton.FontWeight = FontWeights.SemiBold;
hLinkButton.FontSize = 18.0;
hLinkButton.PointerEntered += OnPointerEntered;
LayoutGrid.Children.Add(hLinkButton);
}
private void OnPointerEntered(object sender, PointerRoutedEventArgs e){
var hLButton = sender as HyperlinkButton;
hLButton.Background = new SolidColorBrush(Colors.White);
hLButton.Foreground = new SolidColorBrush(Colors.Red);
hLButton.FontSize = 30.0;
}
// Only fontsize effecting on mouseover, background and foreground is not working

