Completed
Last Updated: 19 Jun 2017 12:09 by ADMIN
ADMIN
Hristo
Created on: 23 Feb 2017 11:31
Category: RibbonBar
Type: Bug Report
1
FIX. RadRibbonBar - prevent the popup of the gallery element to exceed the bounds of the screen
How to reproduce: the issue is only reproducible in client`s environment, Windows 10 build 1607
Public Class Form1

    Sub New()
        InitializeComponent()

    End Sub

    Protected Overrides Sub OnLoad(e As EventArgs)
        MyBase.OnLoad(e)

        Me.RadGalleryElement1.MaxRows = 1

        For i As Integer = 0 To 149
            Dim blueItem1 As New RadGalleryItem("", My.Resources.RibbonBar_GettingStarted_CreatingAGallery001)
            Me.RadGalleryElement1.Items.Add(blueItem1)
        Next
    End Sub

End Class

Workaround: 
Public Class Form1

    Sub New()
        InitializeComponent()

        AddHandler Me.RadGalleryElement1.DropDownOpening, AddressOf RadGalleryElement1_DropDownOpening

    End Sub

    Protected Overrides Sub OnLoad(e As EventArgs)
        MyBase.OnLoad(e)

        Me.RadGalleryElement1.MaxRows = 1

        For i As Integer = 0 To 149
            Dim blueItem1 As New RadGalleryItem("", My.Resources.RibbonBar_GettingStarted_CreatingAGallery001)
            Me.RadGalleryElement1.Items.Add(blueItem1)
        Next
    End Sub

    Private Sub RadGalleryElement1_DropDownOpening(sender As Object, e As System.ComponentModel.CancelEventArgs)
        Dim gallery = DirectCast(sender, RadGalleryElement)
        Dim popup = gallery.GalleryDropDown.PopupElement
        Dim wa = Screen.PrimaryScreen
        popup.Children(0).MaxSize = New Size(0, wa.Bounds.Height)

    End Sub

End Class

(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments