2
C#UWPで記述します。 ScrollBar
スタイリングは機能しませんが、一部はScrollViewer
スタイリングが良いです。背後スクロールバーのスタイルが正しく動作しない
マイコード:
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);
これはC#コードとは関係がありますか? scrollBarの色のみを変更したい – Naduxa
c#コードを使用してスクロールバーの背景色を変更するのは簡単ではありません。 scrollBarの色の色のみを変更したい場合。デフォルトの[style](https://msdn.microsoft.com/en-us/library/windows/apps/mt299150.aspx)の 'root'グリッドの背景色のみを変更できます。 –
ありがとう! – Naduxa