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

Outer border bug?

4 Answers 52 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
J
Top achievements
Rank 1
J asked on 08 Feb 2018, 03:56 PM

I can't seem to get rid of the extra space around RadVerticalLinearGauge. Is this a bug or am I missing a property?

Try this code:

<Grid>
    <Border Background="#FF1B1B1F" CornerRadius="0">
        <telerik:RadVerticalLinearGauge OuterBorderThickness="0" OuterBorderBrush="Green" Background="Red" telerik:StyleManager.Theme="Green">
            <telerik:VerticalLinearScale MajorTickBackground="DeepSkyBlue" MiddleTickBackground="DeepSkyBlue" MinorTickBackground="DeepSkyBlue" MajorTickOffset="-10" MiddleTickOffset="-10" MinorTickOffset="-10" Min="0" Max="100" LabelLocation="Inside" MajorTickLocation="Inside" MinorTickLocation="Inside" MiddleTickLocation="Inside" MiddleTicks="2" MinorTicks="1" LabelFormat="{}{0:F0} %" FontSize="20" Foreground="#FF9EABAA" Fill="{x:Null}">
                <telerik:VerticalLinearScale.Indicators>
                    <telerik:BarIndicator BorderBrush="{x:Null}" Value="100" Background="#FF323232"/>
                    <telerik:BarIndicator BorderBrush="{x:Null}" Value="70" Background="DeepSkyBlue"/>
                </telerik:VerticalLinearScale.Indicators>
            </telerik:VerticalLinearScale>
        </telerik:RadVerticalLinearGauge>
    </Border>
</Grid>

 

There is a black extra space around the red gauge object. Margin is 0 so that's not the culprit. I added OuterBorderThickness and OuterBorderBrush for demonstration purpose. If I set OuterBorderThickness to 10 the green border is drawn over the black area. Not sure if they are related but something to start with.

Shouldn't the red area fill the entire border object with the above property values? Especially if you remove both OuterBorderThickness and OuterBorderBrush property values from the code.

 

 

4 Answers, 1 is accepted

Sort by
0
J
Top achievements
Rank 1
answered on 08 Feb 2018, 03:59 PM
There seems to be a bug in the formatted code. Background and CornerRadius are badly formatted after I moved them on the same line with <Border . They were on their own rows in my original code that I pasted in the formatted code dialog.
0
Dinko | Tech Support Engineer
Telerik team
answered on 13 Feb 2018, 01:08 PM
Hello J H,

I am not exactly sure what do you mean by badly formatted. Can you send me a picture of the behavior? Basically, there are several properties which you can use to customize the borders around the control. You can check the Backgrounds and Borders help article which describes these properties.

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
J
Top achievements
Rank 1
answered on 14 Feb 2018, 12:21 PM

Hi Dinko.

Ok, I wasn't clear enough. My second post was about this forum and the "Format Code Block" under "Formatting options".

As you can see in my first post, the "B" is separated from "ackground" (same with Co rnerRadius) and uses different color.

I.e., my second post can be send to the forum/website admin.

My first post still stands. Ignore the second one.

0
Sia
Telerik team
answered on 15 Feb 2018, 12:21 PM
Hello,

This space is caused by the layout in the default VerticalLinearGauge control template. There is a Grid with three row and three columns. If you set the OuterBackground property to Orange, you will see that this apply to the free space. Please check the attached image. In order to remove it the best option is to set a custom control template as the shown in the attached project (Excuse me for the misleading name). Just remove all settings for Grid.Row, Grid.Column, Grid.RowSpan and Grid.ColumnSpan also.

Regards,
Sia
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Gauges
Asked by
J
Top achievements
Rank 1
Answers by
J
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Sia
Telerik team
Share this question
or