Greetings.
Using the code below, it is possible to set vertical group layout :
RadPanorama1.PanoramaElement.GroupLayout.Orientation = Orientation.Vertical
BUT,
what would be the usage as it disables the scroll ball. I found relevant threads, but It would be helpful for VB.NET developers if you just not provide solutions in C#, but also in VB.NET (I already know C# can be converted to VB.NET, but it isn't comfortable in many cases).
For instance, I edited the relevant thread to create custom Panoroma :
Imports Telerik.WinControlsImports Telerik.WinControls.LayoutsImports Telerik.WinControls.UIClass CustomPanorama Inherits RadPanorama Private vScroll As RadScrollBarElement Protected Overrides Sub CreateChildItems(ByVal parent As Telerik.WinControls.RadElement) MyBase.CreateChildItems(parent) Me.vScroll = New RadScrollBarElement() Me.vScroll.ScrollType = ScrollType.Vertical Me.vScroll.StretchHorizontally = False Me.vScroll.StretchVertically = True Me.vScroll.MinSize = New System.Drawing.Size(16, 0) Me.vScroll.Alignment = System.Drawing.ContentAlignment.TopRight Me.PanoramaElement.Children.Add(vScroll) AddHandler vScroll.ValueChanged, AddressOf vScroll_ValueChanged AddHandler PanoramaElement.GroupLayout.RadPropertyChanged, AddressOf GroupLayout_RadPropertyChanged AddHandler PanoramaElement.TileLayout.RadPropertyChanged, AddressOf GroupLayout_RadPropertyChanged Me.ScrollBarAlignment = HorizontalScrollAlignment.Bottom End Sub Private Sub GroupLayout_RadPropertyChanged(ByVal sender As Object, ByVal e As Telerik.WinControls.RadPropertyChangedEventArgs) If e.Equals(RadElement.BoundsProperty) AndAlso sender = Me.GetCurrentLayout() Then UpdateVScroll() End If End Sub Protected Overrides Sub OnSizeChanged(ByVal e As EventArgs) MyBase.OnSizeChanged(e) UpdateVScroll() End Sub Private Sub UpdateVScroll() vScroll.Maximum = Me.GetCurrentLayout().Size.Height vScroll.LargeChange = Math.Max(0, CInt((Me.Size.Height - Me.PanoramaElement.ScrollBar.Size.Height))) If vScroll.LargeChange >= vScroll.Maximum Then vScroll.Visibility = ElementVisibility.Hidden Else vScroll.Visibility = ElementVisibility.Visible End If If Me.PanoramaElement.ScrollBar.Visibility = ElementVisibility.Visible Then vScroll.Margin = New System.Windows.Forms.Padding(0, 0, 0, Me.PanoramaElement.ScrollBar.Size.Height) Else vScroll.Margin = New System.Windows.Forms.Padding(0) End If End Sub Private Sub vScroll_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) Me.GetCurrentLayout().PositionOffset = New System.Drawing.SizeF(0, -Me.vScroll.Value) End Sub Private Function GetCurrentLayout() As LayoutPanel If Me.ShowGroups Then Return Me.PanoramaElement.GroupLayout End If Return Me.PanoramaElement.TileLayout End Function Public Overrides Property ThemeClassName As String Get Return GetType(RadPanorama).FullName End Get Set(ByVal value As String) MyBase.ThemeClassName = value End Set End PropertyEnd Class
But, in this way, we have to create all elements such as tiles programmatically, really difficult and annoying in comparison with visual creation.
How to enable vertical scrollbar for vertical Group Layout ?
Thanks in advance.
