Telerik Forums
UI for WPF Forum
1 answer
207 views
hi,
when i try to add custom items such as textblocks, ellipse, rectangles or any ui element, they are rendered verticaly,
although i'm using the verticale scale.
I couldn't find any property in the style that can tell the scale to show them horizontaly, like the tick marks embeded directly in the vertical scale.

this is my example:
<Window x:Class="Gauge.MainWindow"
        xmlns:local="clr-namespace:Gauge"
        Title="MainWindow"
        Width="525"
        Height="500">
    <Window.Resources>
        <Style TargetType="{x:Type telerik:Marker}">
            <Setter Property="telerik:ScaleObject.Location" Value="Outside" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:Marker}">
                        <StackPanel Orientation="Horizontal">
                            <Border HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    BorderBrush="{TemplateBinding Background}"
                                    BorderThickness="2">
                                <TextBlock Width="28.5"
                                           Background="{TemplateBinding Background}"
                                           Foreground="Black"
                                           Opacity="0.5"
                                           Padding="2,0"
                                           Text="{Binding Value,
                                                          RelativeSource={RelativeSource TemplatedParent}}" />
                            </Border>
                            <Rectangle Width="10"
                                       Height="2"
                                       VerticalAlignment="Center"
                                       Fill="{TemplateBinding Background}" />
                        </StackPanel>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid Background="AliceBlue">
        <telerik:RadVerticalLinearGauge Grid.Row="1"
                                        Grid.Column="1"
                                        Width="100"
                                        Height="250"
                                        OuterBackground="Azure"
                                        OuterBorderBrush="Black"
                                        telerik:StyleManager.Theme="Windows8">
            <telerik:RadVerticalLinearGauge.Resources>
                <Style x:Key="CustomTick" TargetType="Ellipse">
                    <Setter Property="Fill" Value="White" />
                    <Setter Property="Width" Value="5" />
                    <Setter Property="Height" Value="5" />
                    <Setter Property="telerik:ScaleObject.Location" Value="CenterInside" />
                    <Setter Property="Canvas.ZIndex" Value="1001" />
                </Style>
                <Style x:Key="CustomTickLine" TargetType="Rectangle">
                    <Setter Property="telerik:ScaleObject.RelativeHeight" Value="0.07*" />
                    <Setter Property="Width" Value="1" />
                    <Setter Property="telerik:ScaleObject.Location" Value="CenterOutside" />
                    <Setter Property="Canvas.ZIndex" Value="1001" />
                </Style>
            </telerik:RadVerticalLinearGauge.Resources>
            <telerik:VerticalLinearScale IsInteractive="True"
                                         LabelUseRangeColor="True"
                                         Max="4500"
                                         Min="0">
                <telerik:VerticalLinearScale.Ranges>
                    <telerik:GaugeRange IndicatorBackground="Red"
                                        LabelForeground="Red"
                                        Max="2000"
                                        Min="0"
                                        TickBackground="Red" />
                    <telerik:GaugeRange IndicatorBackground="Green"
                                        LabelForeground="Green"
                                        Max="4500"
                                        Min="2000"
                                        TickBackground="Green" />
                </telerik:VerticalLinearScale.Ranges>
                <telerik:VerticalLinearScale.Indicators>
                    <telerik:BarIndicator x:Name="barIndicator_main"
                                          RangeColorMode="Default"
                                          UseRangeColor="True"
                                          Value="4200" />
                    <telerik:Marker UseRangeColor="True"
                                    telerik:ScaleObject.Offset="15"
                                    telerik:ScaleObject.RelativeHeight="20"
                                    telerik:ScaleObject.RelativeWidth="40"
                                    Value="{Binding Value,
                                                    ElementName=barIndicator_main}">
                        <telerik:Marker.LayoutTransform>
                            <RotateTransform Angle="90" CenterX="0.5" CenterY="0.5" />
                        </telerik:Marker.LayoutTransform>
                    </telerik:Marker>
                </telerik:VerticalLinearScale.Indicators>
                <telerik:VerticalLinearScale.CustomItems>
                    <Ellipse Stroke="Red"
                             Style="{StaticResource CustomTick}"
                             telerik:ScaleObject.Value="0">
                        <!--<Ellipse.LayoutTransform>
                            <RotateTransform Angle="90" CenterX="0.5" CenterY="0.5" />
                        </Ellipse.LayoutTransform>-->
                    </Ellipse>
                    <Rectangle Fill="Red"
                               Style="{StaticResource CustomTickLine}"
                               telerik:ScaleObject.Value="0">
                        <!--<Rectangle.LayoutTransform>
                            <RotateTransform Angle="90" CenterX="0.5" CenterY="0.5" />
                        </Rectangle.LayoutTransform>-->
                    </Rectangle>
 
                    <!--
                        <TextBlock FontWeight="Bold"
                        Foreground="Red"
                        Text="2000"
                        telerik:ScaleObject.Location="Outside"
                        telerik:ScaleObject.Value="2000" />
                    -->
                </telerik:VerticalLinearScale.CustomItems>
            </telerik:VerticalLinearScale>
 
        </telerik:RadVerticalLinearGauge>
    </Grid>
</Window>

Thanks.
Sia
Telerik team
 answered on 07 Nov 2014
3 answers
203 views
is it possible to create and call the radial menu just straight from code ?
Yana
Telerik team
 answered on 07 Nov 2014
3 answers
220 views
Hi,

can anyone tell me if there is an event to detect when just before the "highlightbehavior" and the "filteringbehavior" will be invoke?

Thank's
Alain
Nasko
Telerik team
 answered on 07 Nov 2014
1 answer
228 views
Hi there, im trying to do a text range on a RadRichTextBox is there anyway to get the Document ContentStart?  e.g

TextRange range = new TextRange(RadRichTextBox.Document.ContentStart, CaretPosition);

Petya
Telerik team
 answered on 07 Nov 2014
1 answer
205 views
Hi,
Let me try to explain my issue. In our gridview some columns are bound to GUID properties in view model where we display the corresponding string value of the respective guid via implementing a custom gridview bound column (let's say instead of displaying the categoryId, we display the category name). Hence, user wants to filter the grid view by typing the name of the category but the filter editor is not visible since the bound type is guid (that's what I understand from the documentation), only the distinct filter is visible to the user. I have overcome this issue by overriding the CreateFieldFilterEditor method like so

public override FrameworkElement CreateFieldFilterEditor()
{
            TextBox searchTextBox = new TextBox();
            Binding searchTextBinding = new Binding("Value");
            searchTextBinding.Mode = BindingMode.TwoWay;
            searchTextBinding.FallbackValue = null;
            searchTextBox.SetBinding(TextBox.TextProperty, searchTextBinding);
            return searchTextBox;
}

Now I have two problems, first of all when I click on Filter button, nothing happens. What I expect is either the gridview filtering event is fired or get an exception with not being able to convert the string to guid. But, nothing happens. What might be the reason that stops filtering even firing?

Secondly, I only have "Is Equal To", "Is Not Equal To", "Is Null" and "IsNot null" as available filter operators. But I also need Contains, Starts With etc.
I dont know where to start. I have been looking at the Custom Filter Descriptors but no luck.

I'd be really glad if you can assist me to the right direction.

Thank you in advance.
Dimitrina
Telerik team
 answered on 07 Nov 2014
4 answers
166 views
For simple things like adding two numeric columns I'm in good shape but I have two use cases that I can't seem to figure out how to express.
The data structure is an Account object at the root that has 1 or more Detail child objects.  Detail has a few different string properties.
What I want to be able to do is filter down to Account rows where it has at least one Detail object where its property is equal to a certain string.
In C# it would be like this:
var foo = db.Accounts.Where(a => a.Details.Any(b => b.HCPCS == "55555"));

Also,
I wanted to know if there way any way to cast strings to ints in the editor.
Something like
int.Parse(Field) > 50
Nick
Telerik team
 answered on 07 Nov 2014
3 answers
477 views
I am trying to change the style of the scroll bar on both the Pivot Grid and field list. At the moment when the mouse floats over the "Thumb" (that's the small part of the control you drag left or right or up and down), it turns a solid black which is not the behavior we want.
How can we change the back color of the "thumb" part of the scroll bar when the mouse flats over it.

Thanks
Kalin
Telerik team
 answered on 07 Nov 2014
1 answer
113 views
When I open a docx file where source page setup contains mirrored margins, the editor doesn't respect the format and margins are converted to normal configuration, in other words, odd and even pages have the same margins. There is a way to implement mirrored margins in document layout? 
Petya
Telerik team
 answered on 07 Nov 2014
1 answer
129 views
When I open a docx file where source page setup contains mirrored margins, the editor doesn't respect the format and margins are converted to normal configuration, in other words, odd and even pages have the same margins. There is a way to implement mirrored margins in document layout? 

Thanks.
Petya
Telerik team
 answered on 07 Nov 2014
1 answer
100 views
Hi, 
I am writing some automation test cases where I need to find all child control names in datapager control like nextpage, lastpage, previouspage, firstpage and pagesize etc in WPF application.

Wondering whether it is possible and what the easy method is to get the names of all above controls.

Thanks in advance.

Regards,
Prav
Dimitrina
Telerik team
 answered on 07 Nov 2014
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?