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

Horizontal Orientation makes problems

3 Answers 60 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
ManniAT asked on 16 Apr 2009, 12:42 AM

first of all -- I was really happy when I heard that you now have a property called Orientation.
I knew this from competitor gauges - and was really missing it.

But it work -- partially.

First look at this feature:
I have a "nice" Gauge (except that background image I got to remove somehow):
<control:RadGauge x:Name="radGaugeRam" Width="100" Height="200" HorizontalAlignment="Left">  
        <gauge:LinearScale x:Name="linearScaleRam" Min="0" Max="100" MajorTickStep="10" 
            StrokeThickness="1" Top="0.12" Left="0.55">  
                <gauge:TickProperties Length="0.055"/>  
                <gauge:TickProperties Length="0.0" Visibility="Collapsed" /> 
                <gauge:LabelProperties FontSize="9" Location="Outside" /> 
                <gauge:LinearRange Min="0" Max="70" StartWidth="0.04" 
                    EndWidth="0.04" Location="OverCenter" 
                    Background="Green" BorderBrush="#7FFFFFFF" /> 
                <gauge:LinearRange Min="70" Max="85" StartWidth="0.04" 
                    EndWidth="0.04" Location="OverCenter" 
                    Background="Yellow" BorderBrush="#7FFFFFFF" /> 
                <gauge:LinearRange Min="85" Max="100" StartWidth="0.04" 
                    EndWidth="0.04" Location="OverCenter" 
                    Background="Red" BorderBrush="#7FFFFFFF" /> 
                <gauge:Marker x:Name="gauge_markerRAM" Location="OverCenter"   
                    RelativeHeight="0.04" RelativeWidth="0.08" IsAnimated="True" /> 
Now I (the optimist) tried to set the orientation to horizontal.
And of course I change Width and height -- thats all I have to do (with a different gauge).
This looks "strange" and is far not what I expect from the Orientation property.
Anyhow - I remove the gauge and the linear gauge to get rid of that image.
So it looks "not so bad".
But it is a lot of "messing around" with Top, Left and so on.
Height has no effect at the real height - it simply "cut's things away" if you set it to small.
And if you leave it (assuming the control will "somehow arrange itself" (like used to from standard silverlight controls) it throws an exception:
   bei MS.Internal.XcpImports.CheckHResult(UInt32 hr)  
   bei MS.Internal.XcpImports.RenderTargetBitmapRender(HostingRenderTargetBitmap bitmap, UIElement visual, Int32& dirtyX, Int32& dirtyY, Int32& dirtyWidth, Int32& dirtyHeight)  
   bei System.Windows.Interop.HostingRenderTargetBitmap.Render(UIElement visual)  
   bei MS.Internal.Silverlight.Host.RuntimeInterop.RenderElementToTargetBitmap(Int32 elementKey, Int32 targetBitmapIdentifier)  
   bei MS.Internal.Silverlight.Host.Interop.RenderElementToTargetBitmap(Int32 element, Int32 targetBitmapIdentifier, ISilverlightContentDownloadCallback urlcallback)  
   bei MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.UpdateBitmap()  
   bei MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.UpdateTree()  
   bei MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.MeasureOverride(Size constraint)  
   bei System.Windows.FrameworkElement.MeasureCore(Size availableSize) 
This in a "value out of range" exception. And I get this often with gauge :)
Example - I want to rearrange my attributes - cut and paste is the idea.
The fact is cut - exception - paste - reload designer.

So the conclusion of this post is:
The gauge is still a bit problematic to use.
It is still no "just use out of the box" (for an example that background image).
It is (for me) still a bit confusing - I have mess around with some 0.0xx Top and left things instead of (as used) setting margin or things like width - height.
Width does also "what it likes" to have a horizontal liner gauge filling up a surrounding control with width 450 - I must set the width of the gauge to 490 :)
And it confuses me that I have a Gauge (what for?) in it the LinearGauge (brings the "wonderful" background image) and than the linearscale.

BUT: it becomes better from version to version. For me it has reached now the state "useable".

I hope I could help a bit with this post - go on - make the thing the same quality like your ASP.NET controls :)



3 Answers, 1 is accepted

Sort by
Top achievements
Rank 2
answered on 16 Apr 2009, 01:05 AM
By the way,

like with RadFileExplorer last week I mess around with that thing because I need it in a project.
And again like with RFE - I do this by preparing a sample for the code library :)


Telerik team
answered on 21 Apr 2009, 01:57 PM
Hi Manfred,

We are aware about the problem with exceptions in designer.They occur in the Silverlight designer and it is a bit tricky to catch them, but we will continue our investigation and hopefully include the fix in the next release of the control.

Sincerely yours,
Andrey Murzov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Top achievements
Rank 2
answered on 21 Apr 2009, 02:05 PM
I think the problems came up when you extended "preview capabilities".
I once argued in a post that your controls do not (or only after reload) reflect the changes made in XAML.

Now this issue is almost gone. Nearly everything is reflected in preview immediately.
Great work - and that there are some bugs around is not that problem as long as you are aware of it.

Generally spoken - in the current situation I can reproduce designer crashes - but since I know that they are (at the moment) there I can get used to it.
Instead of "rearranging" attributes from time to time - I do it on a block - after the first change I get a "crash" - ignoring this I do the rest and then I reload it.

The pretty immediate preview is worth these problems at all.
And I know you'll fix them sooner or later.


Asked by
Top achievements
Rank 2
Answers by
Top achievements
Rank 2
Telerik team
Share this question