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

Custom Themes buggy and don't work

3 Answers 147 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
OverCoded
Top achievements
Rank 2
OverCoded asked on 23 Mar 2010, 04:05 AM

I have changed this post from the original to focus on the main problem I am having. I am using the newest version of VSB and Winforms in a C# application. The app uses a RadShapedForm with ThemeManager and the repository.xml and theme.xml loaded into it. My RadTitleBar uses three images for the min, max and close buttons as well as three more mouse over buttons. While the gradient fills work on the title bar none of the images show up in the VS2008 designer or at run time. Also I noticed that after loading the saved repository back in the VSB the images are missing there as well. Why aren’t the images showing up in Visual Studio and why does the VSB loose the location of the images after it is saved. I am guessing the VSB is not saving the correct location of the images for some reason but I have no way to check it because the string is not readable. Can anyone help?

I have attaches two images, one is the missing images on the visual studio designer and the other ris the missing images in th VSB after loading the saved repository.

 

3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 25 Mar 2010, 04:56 PM
Hi Mark Coe,

Thank you for writing.

It is puzzling that the Visual Style Builder does not save the images correctly. When you select an image for a repository item or for a simple property, the selected image is serialized to a base 64 string which gets written in the xml when the theme is saved. We are currently aware of an issue which causes png files to become corrupt when the theme is reloaded and we worked around it by saving our images as bmp files.

If you are still experiencing the issue you described you can send us an image of how you would like your shaped form and title bar to look and we will provide the xml files.

I am looking forward to your reply.

Sincerely yours,
Victor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
OverCoded
Top achievements
Rank 2
answered on 25 Mar 2010, 05:28 PM
I have done a little more debugging on this and found that this is an issue with gif images. if I use a jpeg or png I don't have an issue. I looks like the application wants to default to somehting other than a gif. Also, when I select an icon file (.ico) say for a caption images I get a nasty unhandled exception error. The  error happens as soon as I select the icon in the file choser dialog. See attatched: here are the details: These are infact icon files I have selected, both custiom and windows.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: Bitmaps that are icons cannot be made transparent. Icons natively support transparency. Use the Icon constructor to create an icon.
   at System.Drawing.Bitmap.MakeTransparent(Color transparentColor)
   at Telerik.WinControls.Primitives.ImagePrimitive.BuildImageCache(Image image)
   at Telerik.WinControls.Primitives.ImagePrimitive.GetPaintImage()
   at Telerik.WinControls.Primitives.ImagePrimitive.PaintPrimitive(IGraphics graphics, Single angle, SizeF scale)
   at Telerik.WinControls.Primitives.BasePrimitive.PaintElement(IGraphics graphics, Single angle, SizeF scale)
   at Telerik.WinControls.RadElement.PaintElement(Graphics rawGraphics, IGraphics graphics, Single angle, SizeF scale, Region currentClip)
   at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadItem.PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadItem.PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RootRadElement.Paint(IGraphics graphics, Rectangle clipRectangle)
   at Telerik.WinControls.RadControl.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Telerik.WinControls.RadControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3607 (GDR.050727-3600)
    CodeBase:
file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
VisualStyleBuilder
    Assembly Version: 2010.1.10.308
    Win32 Version: 2010.1.10.0308
    CodeBase:
file:///C:/Program%20Files/Telerik/RadControls%20for%20WinForms%20Q1%202010/bin/VisualStyleBuilder.exe
----------------------------------------
VisualStyleBuilder.Design
    Assembly Version: 2010.1.10.308
    Win32 Version: 2010.1.10.0308
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/VisualStyleBuilder.Design/2010.1.10.308__5bb2a467cbec794e/VisualStyleBuilder.Design.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Telerik.WinControls
    Assembly Version: 2010.1.10.308
    Win32 Version: 2010.1.10.0308
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Telerik.WinControls/2010.1.10.308__5bb2a467cbec794e/Telerik.WinControls.dll
----------------------------------------
Telerik.WinControls.UI
    Assembly Version: 2010.1.10.308
    Win32 Version: 2010.1.10.0308
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Telerik.WinControls.UI/2010.1.10.308__5bb2a467cbec794e/Telerik.WinControls.UI.dll
----------------------------------------
TelerikCommon
    Assembly Version: 2010.1.10.308
    Win32 Version: 2010.1.10.0308
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/TelerikCommon/2010.1.10.308__5bb2a467cbec794e/TelerikCommon.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Telerik.WinControls.GridView
    Assembly Version: 2010.1.10.308
    Win32 Version: 2010.1.10.0308
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Telerik.WinControls.GridView/2010.1.10.308__5bb2a467cbec794e/Telerik.WinControls.GridView.dll
----------------------------------------
Telerik.WinControls.Scheduler
    Assembly Version: 2010.1.10.308
    Win32 Version: 2010.1.10.0308
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Telerik.WinControls.Scheduler/2010.1.10.308__5bb2a467cbec794e/Telerik.WinControls.Scheduler.dll
----------------------------------------
Telerik.WinControls.RadDock
    Assembly Version: 2010.1.10.308
    Win32 Version: 2010.1.10.0308
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Telerik.WinControls.RadDock/2010.1.10.308__5bb2a467cbec794e/Telerik.WinControls.RadDock.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Telerik.WinControls.Themes.Office2007Black
    Assembly Version: 2010.1.10.308
    Win32 Version: 2010.1.10.0308
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Telerik.WinControls.Themes.Office2007Black/2010.1.10.308__5bb2a467cbec794e/Telerik.WinControls.Themes.Office2007Black.dll
----------------------------------------
System.Drawing.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing.Design/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll
----------------------------------------
System.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

0
Victor
Telerik team
answered on 29 Mar 2010, 01:35 PM
Hello Mark Coe,

Thank you for the additional information.

We will research why the gif images are causing problems and will fix the issue if possible. Loading icons is actually not supported and we will add a filter to the browse dialog which will hide the unsupported file formats.
 
If you need to import the icon you have to convert the ico file to png, jpg or bmp.

Please write again if you need further assistance.

 
Kind regards,
Victor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
OverCoded
Top achievements
Rank 2
Answers by
Victor
Telerik team
OverCoded
Top achievements
Rank 2
Share this question
or