Ich schreibe in C# UWP. ScrollBar
Styling funktioniert nicht, aber einige ScrollViewer
Styling ist gut.Styling der Bildlaufleiste funktioniert nicht
Mein Code hinter:
Style ScrollBarStyle = new Style(typeof(ScrollBar));
ScrollBarStyle.Setters.Add(new Setter(ScrollBar.BackgroundProperty, new SolidColorBrush(Colors.Blue)));
Style ScrollViewerStyle = new Style(typeof(ScrollViewer));
ScrollViewerStyle.Setters.Add(new Setter(ScrollViewer.BackgroundProperty, new SolidColorBrush(Colors.Blue)));
Application.Current.Resources.Add(typeof(ScrollViewer), ScrollViewerStyle);
Application.Current.Resources.Add(typeof(ScrollBar), ScrollBarStyle);
Kann es mit C# -Code sein? Ich möchte nur die Farbe der Bildlaufleiste ändern – Naduxa
Es ist nicht einfach, Bildlaufleiste Hintergrundfarbe mit C# -Code zu ändern. Wenn Sie nur die Farbe der Bildlaufleiste ändern möchten. Sie konnten nur die Hintergrundfarbe "root" auf dem Standard [style] ändern (https://msdn.microsoft.com/en-us/library/windows/apps/mt299150.aspx). –
Vielen Dank! – Naduxa