This is a migrated thread and some comments may be shown as answers.

Telerik.Wincontrol.UI.RadForm with Desert Theme

6 Answers 142 Views
Form
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 16 Jun 2011, 04:49 PM
Everytime I create a Form with the Telerik RadForm then assign the Desert theme to it, it looks partly loaded only when I launch the application (As per screenshot).
If you look at the borders, they look blacked out.
I use Telerik Winforms 2011.1.11.419
It only seems to happen with Desert theme, and on all forms (even with no code in it).

6 Answers, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 21 Jun 2011, 04:36 PM
Hello Peter Woodward,

Thank you for writing and for the attached screen shot.

In order to be able to help you I will need some more detailed information about the way you apply the theme. When do you apply it, what method do you use to apply it? If you are able to isolate and reproduce the behavior in a sample application, you will greatly reduce the time I need to investigate and identify the cause of the issue.

Looking forward to your response.

Regards,
Ivan Petrov
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
0
Rob
Top achievements
Rank 1
answered on 22 Jun 2011, 09:18 AM
Hey, you know what, I know how to replicate it but not fix it.
It is due to a timer that we use as a fader to the form. so the main form starts at 0 opacity, then using the code below it increases the fade to 100%


******************** Code ******************************


Public Class Form1




    Private m_showing As Boolean = True




    Private Sub fadeTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fadeTimer.Tick
        Dim d As Double
        If m_showing Then
            d = (1000 / Me.fadeTimer.Interval) / 100
            If Me.Opacity + d >= 1.0 Then
                Me.Opacity = 1.0
                Me.fadeTimer.Stop()
            Else
                Me.Opacity += d
            End If
        Else
            d = (1000.0 / Me.fadeTimer.Interval) / 100.0
            If Me.Opacity - d <= 0.0 Then
                Me.Opacity = 0.0
                Me.fadeTimer.Stop()
            Else
                Me.Opacity -= d
            End If
        End If
    End Sub




    Private Sub MainWindow_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load




        Me.Opacity = 0
        Me.Activate()
        Me.Refresh()
        fadeTimer.Start()
        Me.Refresh()
    End Sub




End Class






******************** Designer  *****************************


<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits Telerik.WinControls.UI.RadForm




    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub




    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer




    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Me.DesertTheme1 = New Telerik.WinControls.Themes.DesertTheme
        Me.RadLabel1 = New Telerik.WinControls.UI.RadLabel
        Me.RadLabel2 = New Telerik.WinControls.UI.RadLabel
        Me.fadeTimer = New System.Windows.Forms.Timer(Me.components)
        CType(Me.RadLabel1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.RadLabel2, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'RadLabel1
        '
        Me.RadLabel1.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.RadLabel1.Location = New System.Drawing.Point(12, 54)
        Me.RadLabel1.Name = "RadLabel1"
        Me.RadLabel1.Size = New System.Drawing.Size(510, 21)
        Me.RadLabel1.TabIndex = 0
        Me.RadLabel1.Text = "all I did was add the telerik references then make the form's theme Desert"
        '
        'RadLabel2
        '
        Me.RadLabel2.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.RadLabel2.Location = New System.Drawing.Point(138, 98)
        Me.RadLabel2.Name = "RadLabel2"
        Me.RadLabel2.Size = New System.Drawing.Size(196, 21)
        Me.RadLabel2.TabIndex = 1
        Me.RadLabel2.Text = "Me.ThemeName = ""Desert"""
        '
        'fadeTimer
        '
        Me.fadeTimer.Interval = 50
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(531, 331)
        Me.Controls.Add(Me.RadLabel2)
        Me.Controls.Add(Me.RadLabel1)
        Me.Name = "Form1"
        Me.Opacity = 0
        '
        '
        '
        Me.RootElement.ApplyShapeToControl = True
        Me.Text = "Form1"
        Me.ThemeName = "Desert"
        CType(Me.RadLabel1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.RadLabel2, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()




    End Sub
    Friend WithEvents DesertTheme1 As Telerik.WinControls.Themes.DesertTheme
    Friend WithEvents RadLabel1 As Telerik.WinControls.UI.RadLabel
    Friend WithEvents RadLabel2 As Telerik.WinControls.UI.RadLabel
    Friend WithEvents fadeTimer As System.Windows.Forms.Timer




End Class
0
Ivan Petrov
Telerik team
answered on 27 Jun 2011, 01:08 PM
Hello Peter,

Thank you for writing back.

I used your code in a project in a try to reproduce the issue, however I was unable to do so. In the project I apply the theme in the form Load event as you did not specify where in your code you are applying it. I have attached a video demonstrating the behavior on my side. I would kindly ask you to provide information on how you are applying the theme and when in order for me to find the case of the issue.

I am looking forward to your reply.

Greetings,
Ivan Petrov
the Telerik team

Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
0
Rob
Top achievements
Rank 1
answered on 27 Jun 2011, 01:39 PM
Thank you for the video.
Very weird that it's not happening to you. However you didn't show the Designer so it could be coming from there.
I sent you my code in the previous reply. I do apply the theme in the designer
Me.ThemeName = "Desert"

Now I ran my simple form again without any themes and I got the same error. So sorry for the lack of investigation but it's not theme related, it's to do with the Telerik.Wincontrols.UI.RadForm
I have attached a screen shot that shows you a brand new project, with only one form, and nothing in it apart from the fade in code. I ran it and it still shows darkened edges, even without a theme.
I checked again, even on my users PC and it's still happening.
OS: XP Pro
Telerik: Q1 2011 (As per screenshot).

If you still cannot reproduce it then please send me a designer screen shot as well just in case.

Thank you.

Anyone else with the same issue?
0
Rob
Top achievements
Rank 1
answered on 27 Jun 2011, 01:53 PM
OK!!!
I have another update.
It doesn't work on XP but works fine on Windows 7!!!!

So please can you re run your test app on a windows XP Pro PC?

Thanks
0
Accepted
Ivan Petrov
Telerik team
answered on 30 Jun 2011, 02:04 PM
Hello Peter,

Thank you for the additional info.

I was able to reproduce the issue on an XP machine. The reason for the issue is that Windows XP does not invalidate the non-client area of the RadForm as Windows 7 does. The workaround to this is to use a RadShapedForm with a RadTitleBar. This way you will not experience this issue as the RadShapedForm does not have a non-client area.

I hope this will help you. If you have further questions, I would be happy to help.

Kind regards,
Ivan Petrov
the Telerik team
Registration for Q2 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting July 18th and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Form
Asked by
Rob
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Rob
Top achievements
Rank 1
Share this question
or