1 Answer, 1 is accepted
0
Hi Terry,
You can remove the opaque "lens" with customizing the template of the LinearGauge element.
Please see the following sample code:
Greetings,
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.
You can remove the opaque "lens" with customizing the template of the LinearGauge element.
Please see the following sample code:
<UserControl x:Class="SilverlightGaugeExamples.Page" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
xmlns:control="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Gauge" |
xmlns:gauge="clr-namespace:Telerik.Windows.Controls.Gauges;assembly=Telerik.Windows.Controls.Gauge" |
Width="400" Height="300"> |
<Grid x:Name="LayoutRoot" Background="White"> |
<control:RadGauge Width="100" Height="250"> |
<gauge:LinearGauge> |
<gauge:LinearGauge.Template> |
<ControlTemplate TargetType="gauge:LinearGauge"> |
<Border Background="{TemplateBinding Background}" |
BorderBrush="{TemplateBinding BorderBrush}" |
BorderThickness="{TemplateBinding BorderThickness}"> |
<Grid> |
<ContentControl> |
<ContentControl.Template> |
<ControlTemplate> |
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> |
<Border HorizontalAlignment="Stretch" |
VerticalAlignment="Stretch" |
BorderThickness="2" |
CornerRadius="6" |
RenderTransformOrigin="0.5,0.5"> |
<Border.RenderTransform> |
<TransformGroup> |
<ScaleTransform ScaleY="-1" ScaleX="-1"/> |
</TransformGroup> |
</Border.RenderTransform> |
<Border.BorderBrush> |
<LinearGradientBrush EndPoint="0.703,0.957" StartPoint="0.297,0.043"> |
<GradientStop Color="#FF828689" Offset="1"/> |
<GradientStop Color="#FFB2B3B4" Offset="0"/> |
</LinearGradientBrush> |
</Border.BorderBrush> |
<Border.Background> |
<LinearGradientBrush EndPoint="0.974451988955925,0.491356224416577" StartPoint="0.07,0.777113682471078"> |
<GradientStop Color="#FF7D7D7D" Offset="0.032501"/> |
<GradientStop Color="#FF4D4D4D" Offset="0.036112000000000033"/> |
<GradientStop Color="#FF454545" Offset="0.381"/> |
<GradientStop Color="#FF9F9F9F" Offset="0.54500001668930054"/> |
<GradientStop Color="#FF656565" Offset="0.065002"/> |
<GradientStop Color="#FF1C1C1C" Offset="0.66"/> |
<GradientStop Color="#FF454545" Offset="0.068613000000000035"/> |
<GradientStop Color="#FF353535" Offset="0.72841"/> |
<GradientStop Color="#FF050505" Offset="0.987361"/> |
</LinearGradientBrush> |
</Border.Background> |
<Grid> |
<Grid.RowDefinitions> |
<RowDefinition Height="5*" /> |
<RowDefinition Height="235*" /> |
<RowDefinition Height="5*" /> |
</Grid.RowDefinitions> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="18*" /> |
<ColumnDefinition Width="72*" /> |
<ColumnDefinition Width="18*" /> |
</Grid.ColumnDefinitions> |
<Border Grid.Row="1" |
Grid.Column="1" |
BorderThickness="2" |
CornerRadius="5"> |
<Border.BorderBrush> |
<LinearGradientBrush EndPoint="0.703,0.957" StartPoint="0.297,0.043"> |
<GradientStop Color="#FF7E8799" Offset="1"/> |
<GradientStop Color="#FF9AA3B7" Offset="0"/> |
</LinearGradientBrush> |
</Border.BorderBrush> |
<Border.Background> |
<LinearGradientBrush EndPoint="0.731560051441193,0.96451336145401" StartPoint="0.465641626218786,0.0437715937207921"> |
<GradientStop Color="#19FFFFFF" Offset="0"/> |
<GradientStop Color="#00FCFDFD" Offset="1"/> |
<GradientStop Color="#7FFEFEFE" Offset="0.17834007948821778"/> |
<GradientStop Color="#7FFCFDFD" Offset="0.77882614961605245"/> |
<GradientStop Color="#CCFDFDFD" Offset="0.42692623137810026"/> |
</LinearGradientBrush> |
</Border.Background> |
</Border> |
</Grid> |
</Border> |
<Grid> |
<Grid.RowDefinitions> |
<RowDefinition Height="8*" /> |
<RowDefinition Height="130*" /> |
<RowDefinition Height="107*" /> |
</Grid.RowDefinitions> |
<Grid.ColumnDefinitions> |
<ColumnDefinition Width="20*" /> |
<ColumnDefinition Width="68*" /> |
<ColumnDefinition Width="20*" /> |
</Grid.ColumnDefinitions> |
</Grid> |
</Grid> |
</ControlTemplate> |
</ContentControl.Template> |
</ContentControl> |
<ItemsPresenter /> |
</Grid> |
</Border> |
</ControlTemplate> |
</gauge:LinearGauge.Template> |
<gauge:LinearScale x:Name="linearScale"> |
</gauge:LinearScale> |
</gauge:LinearGauge> |
</control:RadGauge> |
</Grid> |
</UserControl> |
Greetings,
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.