-
-
Notifications
You must be signed in to change notification settings - Fork 897
Enable ui:NavigationView.IsScrollable="False" on Page #1504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
joesdu
wants to merge
12
commits into
lepoco:main
Choose a base branch
from
joesdu:pagescroll
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7513b4d
fix: Fix system tray right-click menu not displaying
joesdu f399109
fix: Fix system tray right-click menu not displaying
joesdu 407812a
Update src/Wpf.Ui.Tray/Controls/NotifyIcon.cs
joesdu c508dcc
Update src/Wpf.Ui.Tray/Controls/NotifyIcon.cs
joesdu 2227c47
Update src/Wpf.Ui.Tray/Controls/NotifyIcon.cs
joesdu 49dfa3b
Update src/Wpf.Ui.Tray/Controls/NotifyIcon.cs
joesdu 366209b
feat: add tray menu demo
joesdu 6948942
chore: enable ui:NavigationView.IsScrollable="False"
joesdu 3ef7041
feat: add ui:NavigationView.IsScrollable="False" demo
joesdu 3a316d2
remove unused using
joesdu d2a6591
remove unused using
joesdu 0722c92
Chinese -> English
joesdu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/Wpf.Ui.Gallery/ViewModels/Pages/Collections/ListViewScrollViewModel.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// This Source Code Form is subject to the terms of the MIT License. | ||
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. | ||
// Copyright (C) Leszek Pomianowski and WPF UI Contributors. | ||
// All Rights Reserved. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Wpf.Ui.Gallery.ViewModels.Pages.Collections; | ||
|
||
public sealed partial class ListViewScrollViewModel : ViewModel | ||
{ | ||
[ObservableProperty] | ||
private ObservableCollection<string> _bigArray = GenerateBigArray(); | ||
|
||
private static ObservableCollection<string> GenerateBigArray() | ||
{ | ||
var result = new ObservableCollection<string>(); | ||
for (int i = 0; i < 500; i++) | ||
{ | ||
result.Add($"Item {i + 1}"); | ||
} | ||
|
||
return result; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/Wpf.Ui.Gallery/Views/Pages/Collections/ListViewScrollPage.xaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<Page x:Class="Wpf.Ui.Gallery.Views.Pages.Collections.ListViewScrollPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:Wpf.Ui.Gallery.Views.Pages.Collections" | ||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" | ||
xmlns:system="clr-namespace:System;assembly=System.Runtime" | ||
xmlns:controls="clr-namespace:Wpf.Ui.Gallery.Controls" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800" | ||
Title="ListViewScrollPage" | ||
d:DataContext="{d:DesignInstance local:ListViewPage, | ||
IsDesignTimeCreatable=False}" | ||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}" | ||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}" | ||
Foreground="{DynamicResource TextFillColorPrimaryBrush}" | ||
ui:NavigationView.IsScrollable="False"> | ||
|
||
<ui:Card VerticalAlignment="Top" VerticalContentAlignment="Stretch" Padding="14" Margin="0,0,0,24"> | ||
<ui:ListView ItemsSource="{Binding ViewModel.BigArray, Mode=OneWay}" | ||
d:ItemsSource="{d:SampleData ItemCount=10}" | ||
BorderThickness="0" SelectionMode="Single" | ||
ScrollViewer.HorizontalScrollBarVisibility="Auto" | ||
ScrollViewer.VerticalScrollBarVisibility="Auto" | ||
TextOptions.TextFormattingMode="Display" | ||
TextOptions.TextRenderingMode="ClearType" | ||
VirtualizingStackPanel.IsVirtualizing="True" | ||
VirtualizingStackPanel.VirtualizationMode="Recycling" | ||
RenderOptions.ClearTypeHint="Enabled"> | ||
<ListView.ItemTemplate> | ||
<DataTemplate DataType="{x:Type system:String}"> | ||
<ui:TextBlock FontSize="12" VerticalAlignment="Top" | ||
Text="{Binding}" | ||
FontFamily="Consolas, Cascadia Mono, Segoe UI Mono, Courier New" | ||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"/> | ||
</DataTemplate> | ||
</ListView.ItemTemplate> | ||
</ui:ListView> | ||
</ui:Card> | ||
</Page> |
42 changes: 42 additions & 0 deletions
42
src/Wpf.Ui.Gallery/Views/Pages/Collections/ListViewScrollPage.xaml.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// This Source Code Form is subject to the terms of the MIT License. | ||
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT. | ||
// Copyright (C) Leszek Pomianowski and WPF UI Contributors. | ||
// All Rights Reserved. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
joesdu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
using Wpf.Ui.Controls; | ||
using Wpf.Ui.Gallery.ControlsLookup; | ||
using Wpf.Ui.Gallery.ViewModels.Pages.Collections; | ||
|
||
namespace Wpf.Ui.Gallery.Views.Pages.Collections; | ||
/// <summary> | ||
/// ListViewScrollPage.xaml 的交互逻辑 | ||
joesdu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
/// </summary> | ||
[GalleryPage("Selectable list.", SymbolRegular.GroupList24)] | ||
public partial class ListViewScrollPage : INavigableView<ListViewScrollViewModel> | ||
{ | ||
/// <inheritdoc /> | ||
public ListViewScrollViewModel ViewModel { get; set; } | ||
|
||
public ListViewScrollPage(ListViewScrollViewModel viewModel) | ||
{ | ||
ViewModel = viewModel; | ||
DataContext = this; | ||
|
||
InitializeComponent(); | ||
} | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.