C
C#Alex

✅ TreeView scrollbar isn't visible

I have a tree view, and I want it to be scrollable when there are many items. I have tried to put it in the ScrollView and set ScrollViewer.VerticalScrollBarVisibility="Auto" , but it doesn't solve the problem.
No description
B
Buddy43d ago
Please paste the xaml $paste
M
MODiX43d ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
A
Alex43d ago
<StackPanel VerticalAlignment="Stretch">
<Button Command="{s:Action OnLoadAsync}">Load</Button>
<TreeView ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" ItemsSource="{Binding Path=Directories}">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type models:NavigationPaneItem}" ItemsSource="{Binding Children}">
<TextBlock Text="{Binding DisplayName}"/>
</HierarchicalDataTemplate>
</TreeView.Resources>
</TreeView>
</StackPanel>
<StackPanel VerticalAlignment="Stretch">
<Button Command="{s:Action OnLoadAsync}">Load</Button>
<TreeView ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" ItemsSource="{Binding Path=Directories}">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type models:NavigationPaneItem}" ItemsSource="{Binding Children}">
<TextBlock Text="{Binding DisplayName}"/>
</HierarchicalDataTemplate>
</TreeView.Resources>
</TreeView>
</StackPanel>
L
leowest43d ago
dont use stackpanel use a grid stackpanel gives it internally the size it wants is something to do with the stackpanel providing as much height as the inside content wants so the scrollviewer never saw the need to show up and say hi
A
Alex43d ago
it solved the problem, thank you
M
MODiX43d ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server
More Posts
Unit testing not working, doesn't hit multiple test classesThe first test class runs perfectly fine, but the second one doesnt even get hit. I cant debug or seASP.NET Identity Login ErrorWhen trying to sign in using SignInManager, I get a SqlException: Invalid column name 'UserId1'. WhHow do we read network/handshake messages?Hello friends, I have been given the following task: - I should establish a connection to a WebSockeCan different validation attributed be applied to a field based on the active profile?Hello, In `Development` I would need to apply a different validation attribute to a DTO field, withAndroid Emulatorhow to fix this guys please help me.AS2 over http C# Send message with signature to mendelson server.Hi guys) I am new in this channel. Can you please help me with AS2 over http PKCS#7 .p7s file) Yeah.Persistent error with dotnet cli and installing maui workspaceI've tried time and again now without joy. There is precious little info on this issue out there (onneed tips to improve my logical skills and .net c# skills as I'm a intermediate dev.Hi,I want to improve my logical and .net c# skills so i want please suggest me or guide me about to Issue with Azure AD B2C Custom Domains: Unexpected Redirect Behavior and Domain DependencyHey everyone, I'm hopeful that there are experienced individuals with Azure AD B2C expertise who canNode editor, many operations - how to make it maintainableHi, I'm trying to develop an app with node editor that ideally will provide no code openCV functionacannot close window...Release date of 8.0.3?Hey, I have been struggling with an issue that from what I understand will be solved in 8.0.3. httpRedirecting the native standard output streamI need to call into native code the problem is that it writes some of it's output using stdout. Is iWhere can I find a working library for making a LLVM compiler?I found this library (https://github.com/dotnet/LLVMSharp) that provides extern references for the LCheck value type of extended class instanceI have `BaseClass` and `MyClass : BaseClass`. Using `val is BaseClass` will return true for any obj✅ Am I using NumberFormatInfo properly?I have a list of ca. 400 numbers which I want to convert to percentage strings as part of an endpoin✅ .NET MAUI LayoutI am trying to create a password field with the show icon to the right of the password field, when iGetting an error for an undefined variableHello, I'm a CS major working on a project so I'm still pretty new. I'm getting a CS0165 error on li