Telerik Forums
UI for WPF Forum
3 answers
152 views

Hi,

Can you explain how to set the spacing in between candlesticks? 

here is my XAML code 

 

                           <local:CustomSeriesDescriptorSelector.OhlcDescriptor>
                                <telerik:OhlcSeriesDescriptor 
                                            CategoryPath="Date" 
                                            OpenPath="Open" 
                                            HighPath="High" 
                                            LowPath="Low" 
                                            ClosePath="Close"
                                            ItemsSourcePath="OhlcData">
                                    <telerik:OhlcSeriesDescriptor.Style>
                                        <Style TargetType="telerik:CandlestickSeries">
                                            <Setter Property="ShowLabels" Value="True" />
                                            <Setter Property="LegendSettings">
                                                <Setter.Value>
                                                    <telerik:SeriesLegendSettings Title="ohlc data" />
                                                </Setter.Value>
                                            </Setter>
                                        </Style>
                                    </telerik:OhlcSeriesDescriptor.Style>
                                </telerik:OhlcSeriesDescriptor>
                            </local:CustomSeriesDescriptorSelector.OhlcDescriptor>

Attached the screen of what it looks like. My objective is that the candles do not overlap.

psyko
Top achievements
Rank 1
 answered on 26 Nov 2016
2 answers
157 views

Hi,

Below is an excerpt of some xaml I am using. The important thing to notice is that I have a listbox of checkboxes associated with each grid row.
How do I bind the all the checkboxes that I want checked for selected gridview item?

Thanks ... Ed

 

 

01.<telerik:RadGridView  x:Name="ssSamples" Grid.Row="0" Grid.Column="0"
02.                    AutoGenerateColumns="False"  IsReadOnly="True"
03.                     ItemsSource="{Binding Samples}"
04.                     SelectedItem="{Binding SelectedRow}"
05.                     MaxHeight="500" RowIndicatorVisibility="Visible"
06.                             >
07.    <telerik:RadGridView.Columns>
08.        <telerik:GridViewToggleRowDetailsColumn />
09.        <telerik:GridViewDataColumn Width="auto" Header="Sample Key" DataMemberBinding="{Binding Sample_Key}"/>
10.        <telerik:GridViewDataColumn Width="auto" Header="Client Sample Id" DataMemberBinding="{Binding ClientSampleID}"/>
11.        <telerik:GridViewDataColumn Width="auto" Header="Arrival" DataMemberBinding="{Binding Arrival}"/>
12.        <telerik:GridViewDataColumn Width="*" Header="Status" DataMemberBinding="{Binding Status}"/>
13.    </telerik:RadGridView.Columns>
14.    <telerik:RadGridView.RowDetailsTemplate>
15.        <DataTemplate>
16.            <Grid Width="Auto" HorizontalAlignment="Stretch">
17.                <Grid.RowDefinitions>
18.                    <RowDefinition />
19.                    <RowDefinition />
20.                </Grid.RowDefinitions>
21.                <Grid.ColumnDefinitions>
22.                    <ColumnDefinition Width="Auto" />
23.                    <ColumnDefinition Width="Auto" />
24.                    <ColumnDefinition Width="Auto" />
25.                    <ColumnDefinition Width="Auto" />
26.                </Grid.ColumnDefinitions>
27. 
28.                <Label Content="Associated Techniques:" Grid.Row="0" Grid.Column="2"
29.                       HorizontalAlignment="Left" HorizontalContentAlignment="Left"  Width="350" Height="auto"/>
30.                <telerik:RadListBox x:Name="lstTechniques" Grid.Row="1" Grid.Column="2" MaxHeight="210"
31.                    SelectionMode="Extended"
32.                    ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor,
33.                                    AncestorType={x:Type UserControl} },
34.                                    Path=DataContext.Techniques}"
35.                                        >
36.                    <telerik:RadListBox.ItemTemplate>
37.                        <DataTemplate >
38.                            <CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay}"
39.                                                        Content="{Binding TechniqueName}"/>
40.                        </DataTemplate>
41.                    </telerik:RadListBox.ItemTemplate>
42.                </telerik:RadListBox>
43.            </Grid>
44. 
45.        </DataTemplate>
46.    </telerik:RadGridView.RowDetailsTemplate>
47.</telerik:RadGridView>
Randy Hompesch
Top achievements
Rank 1
 answered on 26 Nov 2016
3 answers
293 views

hi

I have raddataform with fields

empid

name

salary

I wanna to Making a raddataform field (empid) read-only  programmlly without disabling it, 

programmlly in c# code  not xaml

Stefan
Telerik team
 answered on 25 Nov 2016
6 answers
573 views

I have multiple VisualizationLayers in my radmap. On one layer I want to render a collection of shapes (lines, polygons, ellipses). I have bound the collection of shapes to my layer but I notice that when the map is zoomed the shapes remain a constant size. I want to achieve the behaviour shown in the sample app "Information Layer Map Polygon" so the shapes grow/shrink as the map is zoomed in or out. The sample code uses MapPolygon (which I can't use in VisualizationLayer?). Is there some way for me to get the same behaviour in a VisualizationLayer?

Thanks

Pete

 

Peter
Top achievements
Rank 1
Veteran
 answered on 25 Nov 2016
3 answers
343 views

Hi,

i am trying to change the header style of the PropertyGrid (the textbox "searchAsYouTypeTextBox" right and the search ring "Data" left of the textbox). How can i do it? There is no property "Header" to set for the style.

When i generate style Template for the property grid control i lost my own editor template for my property grid.

How can i achieve that (only style for property grid header or bind my item into the new generated template for property grid and use another template into?

Thanks for your help!

Richard

 

Dilyan Traykov
Telerik team
 answered on 25 Nov 2016
2 answers
249 views

I have a very simple RadComboBox but you cannot select an item with the mouse it only accepts a different item by pressing enter!!!

I've found there is a tiny, perhaps 1 pixel border around the edge of the ComboBoxItem, where you can click with the mouse and the selection works. But this is totally unacceptably and far too fiddly. How can I get this most basic functionality working?

Andrew

Nasko
Telerik team
 answered on 25 Nov 2016
10 answers
368 views

How do I get the first item in the list to be the top most item in the carousel view by default?

I've uploaded a sample project here - https://1drv.ms/u/s!AlTc1v3Zi2qjiad16m_HibRZA6awag

 

Phoenix
Top achievements
Rank 1
 answered on 24 Nov 2016
9 answers
1.6K+ views

Hi Peshito,

I have one more question,  how to remove the "MouseOver" color in RadGridView column Header? please help me

Regards,

Bennit.

Stefan
Telerik team
 answered on 24 Nov 2016
13 answers
2.5K+ views

Hi,

We are currently using Telerik's RadGridView control with extended/mixed mode selection enabled.

Is there any way to Bind directly to the:

a) SelectedItem/SelectedItems

b) The SelectedCells' Column and Item(s) properties

c) FilterDescriptors (to suspend/resume notifications)

Using a RadContextMenu for Pure MVVM?

We are currently using an approach with references RadGridView UI elements via the ViewModel, which we'd like to avoid. We have also considered the SelectedItems approach through a behavior, as illustrated here:

http://www.telerik.com/blogs/how-to-synchronize-your-ui-selected-items-with-your-data-context-using-mvvm-and-blend-behaviors-for-silverlight-and-wpf

However, the performance of the selection slows the larger the number of items highlighted, since the behavior is triggering the Transfer method in the behavior for each row highlighted in the RadGridView. We'd like to avoid using a behavior, if possible, as our users are working with large datasets and will need to be able to selected 1M+ rows at a time.

Currently, we are using this approach, where we are able to pass the RadGridView to the ViewModel as a CommandParameter from a RadContextMenu in its entirety:

<telerik:RadGridView Grid.Row="1" 
                             Name="dtgMyData" 
                             ItemsSource="{Binding Path=MyDataCollection}" 
                             AutoGenerateColumns="False" 
                             IsReadOnly="False" 
                             RowIndicatorVisibility="Visible"
                             HorizontalAlignment="Stretch"
                             SelectionMode="Extended"
                             SelectionUnit="Mixed">

...

<telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="MyDataGridContextMenu">
                    <telerik:RadContextMenu.Items>
                        <telerik:RadMenuItem Header="Filter Selected" Command="{Binding DataContext.FilterSelectionCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}}}" CommandParameter="{Binding Path=UIElement, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=telerik:RadContextMenu}}"/>
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>

...

...<columns>...

Where the Command and CommandParameters are bound to the ViewModel.

Is there a way to avoid binding to the ViewModel directly referencing UI controls using a RadContextMenu without using behaviors? For example, is there another Binding option for the CommandParameter above that is shown to reference the entire RadGridView, such that we can reference SelectedCells.Item(s) or SelectedItem/SelectedItems bound to our Model (i.e. MyData) directly, and if at all possible, the Column and/or Column FilterDescriptors without having to use code-behind and avoiding the use of a behavior?

 

Kind regards

 

Stefan
Telerik team
 answered on 24 Nov 2016
10 answers
1.0K+ views

Good afternoon. How can I save the geometry of the selected objects to RadDiagram in xaml file? Now I take the RadDiagramShape geometry, convert it to a string and written in the xaml file. But when I try the reverse conversion, an error is thrown

1) the RadDiagramShape declare

<telerik:RadDiagramShape x:Name="ConditionShape"
 IsEditable="False"
AllowCopy="False" AllowCut="False" AllowDelete="False" AllowDrop="False" AllowPaste="True" Background="Azure" 
Geometry="{telerik:CommonShape ShapeType=RectangleShape }" StrokeThickness="1" Height="100" Width="100" RenderTransformOrigin="0.5,0.5" Position="180,50"/>

2) the entry in the xaml file

Init.overview.LibraryItems.FunctionItem[end].Data = Convert.ToString(ShapeFactory.GetShapeGeometry(FlowChartShapeType.DecisionShape));

 FunctionLibrary Done = new FunctionLibrary();
            Done = Init.overview;
            XmlSerializer xml = new XmlSerializer(typeof(FunctionLibrary));
            file.Close();
            using (var fStream = new FileStream(path: "./****.xml", mode: FileMode.Create, access: FileAccess.Write, share: FileShare.ReadWrite))
            {
                xml.Serialize(fStream, Done);
                fStream.Close();
            }

3) the result in a file

      <Data>M56;0,5L111,5;37,5 56;74,5 0,5;37,5z</Data>
4)  and the inverse transform

var converter = new System.Windows.Media.GeometryConverter();

var data = (Geometry) converter.ConvertFromString(ListCode[i].Data);

ConditionShape.Geometry = data;

this line is not recognized as geometry. how to convert in the required format?

Martin Ivanov
Telerik team
 answered on 24 Nov 2016
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
PersistenceFramework
DataPager
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?