Telerik Forums
UI for WPF Forum
5 answers
314 views
Hello.

I need to implement a chart with vertical lines and labels, as I understand it can be implemented using annotations.
As I can see from examples, it should look lile this:
<telerik:RadCartesianChart.Annotations>
    <telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=horizontalAxis}" Value="3000" Label="label1">
        <telerik:CartesianGridLineAnnotation.LabelDefinition>
            <telerik:ChartAnnotationLabelDefinition Location="Right" VerticalAlignment="Top" HorizontalOffset="4" DefaultVisualStyle="{StaticResource annotationLabelStyle}">
            </telerik:ChartAnnotationLabelDefinition>
        </telerik:CartesianGridLineAnnotation.LabelDefinition>
    </telerik:CartesianGridLineAnnotation>
    <telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=horizontalAxis}" Value="3200" Label="label2">
        <telerik:CartesianGridLineAnnotation.LabelDefinition>
            <telerik:ChartAnnotationLabelDefinition Location="Right" VerticalAlignment="Top" HorizontalOffset="4" DefaultVisualStyle="{StaticResource annotationLabelStyle}">
            </telerik:ChartAnnotationLabelDefinition>
        </telerik:CartesianGridLineAnnotation.LabelDefinition>
    </telerik:CartesianGridLineAnnotation>
</telerik:RadCartesianChart.Annotations>

But information for annotations I get from ViewModel. And I don't see a way how to bind my collections from ViewModel to Annotations collection. Is it possible? I mean something like this:
<telerik:AnnotationSeries  ItemsSource="{Binding AnnotationsItems}" />

I found a workaround, to add annotations in a code-behind class of the view:
foreach (var item in ViewModel.AnnotationsItems)
{
    Chart1.Annotations.Add(new CartesianGridLineAnnotation { Label = item.Name, Value = item .Coordinate, Axis = Chart1.HorizontalAxis });
}
But seems it is not a true way.


Best regards,
Dimitr


Peshito
Telerik team
 answered on 26 Mar 2014
7 answers
565 views
I'm upgrading my telerik version, I need to find the index of the first visible row.  I used to do this:

this.ItemsControl.VirtualizingPanel.FirstVisibleChildIndex;

But this code no longer compiles, and I can't find an alternative.  Does this functionality still exists in the newer versions of the product?
Dimitrina
Telerik team
 answered on 26 Mar 2014
1 answer
190 views
Hi there, 
I need to place button into PropertyDefinition, and bind Command on click this button, which opening window,
How  can I do that?
Hristo
Telerik team
 answered on 26 Mar 2014
2 answers
315 views
Hi,

I'm trying to hide the top row (where the group button, sort button and search box are located).

I have set both the SearchBoxVisibility and SortAndGroupButtonsVisibility to false so all the above controls are hidden.

The result I have is an empty grey row with nothing inside it.

I want to hide that row and recover that real-estate for the grid itself.

I wasn't able to locate a property that does that and couldn't find an answer searching this forum (and google).

I would appreciate your help on this matter.

Thanks in advance.
Maor
Top achievements
Rank 1
 answered on 26 Mar 2014
4 answers
688 views
Hi,

I have an application in which we haven't defined width and height for the windows or controls, instead we used Auto and * mostly for control size. To make the screen design fluid and support multiple display sizes.

I am facing an issue in showing a horizontal scroll bar for my RadGridView which is placed inside panel with no width and height defined.  I have defined Auto and * as the Column's width in gridview. 

My requirement is that a scroll bar should appear when the content of the grid take more space than the space available on the screen. But currently the content is clipped and no scrollbar appears (see screenshot attached).

The code I am using is:

<Grid x:Name="LayoutRoot">
    <telerik:RadExpander IsExpanded="True">
        <DockPanel>
            <telerik:RadDataPager DockPanel.Dock="Bottom"/>
            <telerik:RadGridView x:Name="billDataGrid" AutoGenerateColumns="False">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Header="Ship To Bill To ID" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding BillToID}"/>
                    <telerik:GridViewDataColumn Header="Ship To ID" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding ShipToID}"/>
                    <telerik:GridViewDataColumn Header="Bill TO ID" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding ID}"/>
                    <telerik:GridViewDataColumn Header="Bill To Name" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Name}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address1" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address1}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address2" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address2}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address3" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address3}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address4" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address4}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address5" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address5}"/>
                    <telerik:GridViewDataColumn Header="Bill To Address6" Width="Auto" TextWrapping="Wrap" DataMemberBinding="{Binding Address6}"/>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
        </DockPanel>
    </telerik:RadExpander>
</Grid>


Please help me getting a scroll bar.
Thanks.
Dipti
Top achievements
Rank 1
 answered on 26 Mar 2014
2 answers
173 views
Hello Telerik team
Let’s say I want to do a mail merge using your awesome WPF RadRichTextBox, but as you know, a regular mail merge will include data coming from a database.
i have search, and search your documentation and forum,  but the provided information is very vague , even considering that most users will use the mail merge feature with data coming from a database.
And assume i have an Observable Collection (or BindableCollection for that matter) on the view model 'public ObservableCollection MyCollection"
Considering all your dataProviders and such (yes I also read about that) , how i can read data from my database into the radTextBox so i can do mail merge
The data is served by Entity Framework 6, Unit of work, Cliburn Micro and all of that, which actually does not matter because the important thing is the Observable Collection has the data i want to be bound to the telerik RadRichTextBox

Regards
Oscar
Top achievements
Rank 1
 answered on 25 Mar 2014
4 answers
187 views
I've got a RadListBox, and each item in it has a ToggleButton that opens a Popup that's defined in each of the list box items; so the Popup isn't shared between the items.  These Popups contain controls for data entry like textboxes, checkboxes, etc.  When the user clicks and drags their mouse within the Popup, the drag operation for the containing RadListBoxItem starts.  This can happen in the background of the popup or when trying to select some text within some other control in the Popup, like a TextBox.

I'd like to completely stop the drag operation from ever starting when I've got this Popup open.

What's the best way to accomplish this?
Nathan
Top achievements
Rank 1
 answered on 25 Mar 2014
2 answers
157 views
Hi,

I have a Rich Text Box with tracking changes enabled which contains a single table from a XAMLDataProvider. When adjusting the column/row widths using the thumbs in the UI i get a confirmation dialog saying "This action will be marked as changed. Do you wish to continue?".

Is there any way to disable this warning?

Many thanks,
Chris
Chris
Top achievements
Rank 1
 answered on 25 Mar 2014
1 answer
120 views
Hi,

From what have seen it's easy to apply this kind of filter to a RadGridView (Country and Capital are the columns):
Country.Contains("France") AND (Capital.Contains("Paris") OR Capital.Contains("London")) -> this will give us 1 row (France, Paris)

What about if I want to do:
Country.Contains("France") OR (Capital.Contains("Paris") OR Capital.Contains("London")) -> so I would get 2 row (France, Paris; England, London)

I read the below pages but I couldn't find a solution for this. Can I do it in some how?
http://www.telerik.com/help/wpf/radgridview-filtering-icolumn-filter-descriptors.html
http://www.telerik.com/help/wpf/gridview-filtering-programmatic.html

Thanks
Dimitrina
Telerik team
 answered on 25 Mar 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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?