Reputation: 1398
I have this code to create a listbox on my Menu.xaml code behind (Menu.xaml.vb):
Dim mm As New ListBox()
AddHandler mm.SelectionChanged, AddressOf Me.ListBox_SelectionChanged
mm.FontSize = 20
Dim nn As New ListBoxItem
nn.Content = "NOTIFICATIONS:"
nn.Foreground = Brushes.White
nn.Background = Brushes.DarkSlateBlue
nn.FontSize = 44
nn.FontWeight = FontWeights.Bold
mm.Items.Add(nn)
Now I wanted to disable the scrolling, or in other case hide the scrollbar but if I check on mm properties there is no reference to the Scroll
any help or clue?
Thanks in advance
Upvotes: 1
Views: 800
Reputation: 1979
ScrollViewer.SetHorizontalScrollBarVisibility(mm, ScrollBarVisibility.Disabled);
ScrollViewer.SetVerticalScrollBarVisibility(mm, ScrollBarVisibility.Disabled);
Upvotes: 3