diff --git a/src/Consolonia.Core/Infrastructure/ConsoloniaApplication.cs b/src/Consolonia.Core/Infrastructure/ConsoloniaApplication.cs index 31e034ed..c1b20fa4 100644 --- a/src/Consolonia.Core/Infrastructure/ConsoloniaApplication.cs +++ b/src/Consolonia.Core/Infrastructure/ConsoloniaApplication.cs @@ -27,12 +27,12 @@ public override void OnFrameworkInitializationCompleted() DataTemplates.Add(new FuncDataTemplate( (data, _) => { - if (data != null && data is string) + if (data != null) { var result = new ConsoloniaAccessText(); // ReSharper disable AccessToStaticMemberViaDerivedType result.Bind(TextBlock.TextProperty, - result.GetObservable(Control.DataContextProperty)); + result.GetBindingObservable(Control.DataContextProperty, x => x?.ToString())); return result; } diff --git a/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryScrollViewer.axaml b/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryScrollViewer.axaml index 76337c6b..88f93824 100644 --- a/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryScrollViewer.axaml +++ b/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryScrollViewer.axaml @@ -12,52 +12,44 @@ - - - + - - - + - Focus to ScrollViewer - /; ;\ - __ \\____// - /{_\_/ `'\____ - \___ (o) (o } - _____________________________/ :--' - ,-,'`@@@@@@@@ @@@@@@ \_ `__\ - ;:( @@@@@@@@@ @@@ \___(o'o) - :: ) @@@@ @@@@@@ ,'@@( `====' - :: : @@@@@: @@@@ `@@@: - :: \ @@@@@: @@@@@@@) ( '@@@' - ;; /\ /`, @@@@@@@@@\ :@@@@@) - ::/ ) {_----------------: :~`,~~; - ;;'`; : ) : / `; ; -;;;; : : ; : ; ; : -`'`' / : : : : : : - )_ \__; ";" :_ ; \_\ `,',' - :__\ \ * `,'* \ \ : \ * 8`;'* * - `^' \ :/ `^' `-^-' \v/ : \/ -Bill Ames - - + + + + + + + \ No newline at end of file diff --git a/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryScrollViewer.axaml.cs b/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryScrollViewer.axaml.cs index 7d989947..6f1e68ac 100644 --- a/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryScrollViewer.axaml.cs +++ b/src/Consolonia.Gallery/Gallery/GalleryViews/GalleryScrollViewer.axaml.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.ComponentModel; using System.Runtime.CompilerServices; @@ -24,6 +25,8 @@ public GalleryScrollViewer() public class ScrollViewerPageViewModel : ViewModelBase { private readonly bool _allowAutoHide; + + private readonly string[] _cows = Array.Empty(); private readonly ScrollBarVisibility _horizontalScrollVisibility; private readonly ScrollBarVisibility _verticalScrollVisibility; @@ -38,8 +41,33 @@ public ScrollViewerPageViewModel() }; HorizontalScrollVisibility = ScrollBarVisibility.Auto; - VerticalScrollVisibility = ScrollBarVisibility.Auto; + VerticalScrollVisibility = ScrollBarVisibility.Visible; AllowAutoHide = true; + var text = new List(); + for (int i = 0; i < 30; i++) + text.AddRange(""" + /; ;\ + __ \\____// + /{_\_/ `'\____ + \___ (o) (o } + _____________________________/ :--' + ,-,'`@@@@@@@@ @@@@@@ \_ `__\ + ;:( @@@@@@@@@ @@@ \___(o'o) + :: ) @@@@ @@@@@@ ,'@@( `====' + :: : @@@@@: @@@@ `@@@: + :: \ @@@@@: @@@@@@@) ( '@@@' + ;; /\ /`, @@@@@@@@@\ :@@@@@) + ::/ ) {_----------------: :~`,~~; + ;;'`; : ) : / `; ; + ;;;; : : ; : ; ; : + `'`' / : : : : : : + )_ \__; ";" :_ ; \_\ `,',' + :__\ \ * `,'* \ \ : \ * 8`;'* * + `^' \ :/ `^' `-^-' \v/ : \/ + Bill Ames + + """.Split(['\r', '\n'], StringSplitOptions.RemoveEmptyEntries)); + Cows = [.. text]; } public bool AllowAutoHide @@ -61,6 +89,12 @@ public ScrollBarVisibility VerticalScrollVisibility } public List AvailableVisibility { get; } + + public string[] Cows + { + get => _cows; + init => RaiseAndSetIfChanged(ref _cows, value); + } } public class ViewModelBase : INotifyPropertyChanged diff --git a/src/Consolonia.Themes/Templates/Controls/ComboBoxItem.axaml b/src/Consolonia.Themes/Templates/Controls/ComboBoxItem.axaml index 71639bc3..f9cc7d55 100644 --- a/src/Consolonia.Themes/Templates/Controls/ComboBoxItem.axaml +++ b/src/Consolonia.Themes/Templates/Controls/ComboBoxItem.axaml @@ -13,7 +13,8 @@ Value="Left" /> - + + Background="Transparent"> diff --git a/src/Consolonia.Themes/Templates/Controls/ListBoxItem.axaml b/src/Consolonia.Themes/Templates/Controls/ListBoxItem.axaml index f6122fa8..30cbf6bf 100644 --- a/src/Consolonia.Themes/Templates/Controls/ListBoxItem.axaml +++ b/src/Consolonia.Themes/Templates/Controls/ListBoxItem.axaml @@ -10,19 +10,18 @@ Value="{DynamicResource ThemeTransparentBrush}" /> - - - - - + + + diff --git a/src/Consolonia.Themes/Templates/Controls/ScrollViewer.axaml b/src/Consolonia.Themes/Templates/Controls/ScrollViewer.axaml index 4e2f75cf..c8bb7c4d 100644 --- a/src/Consolonia.Themes/Templates/Controls/ScrollViewer.axaml +++ b/src/Consolonia.Themes/Templates/Controls/ScrollViewer.axaml @@ -22,21 +22,23 @@ - - - - - + + + + + + +