Hello, I am trying to convert my existing C# program from the real Microsoft WPF components to the Telerik components. Now I have the problem that I use the function DataGrid.Items.GetItemAt with the Microsoft components. What is the equivalent in Telerik RadGridView?
Thank you in advance
When a user drags a tab out of a host TabbedWindow it creates a new TabbedWindow to host the Tab but this new TabbedWindow doesn't inherit the configuration of the original parent.
What would be the best way to get a handle on this new TabbedWindow and apply configuration style. E.g. disable the new tab button.
Thanks,
Richard
(PS. I love this new control, it has really helped me)
Is there a way to enable WPF RadDock to open floated windows in a standalone window rather than a ToolWindow? The feature looks like its available in the WinForms version of RadDock but not WPF RadDock.
Would this be achieved in the DockingPanesFactory?
<telerik:RadDocking Grid.Row="2" x:Name="radDocking"<br> prism:RegionManager.RegionName="DocumentsRegion"<br> BorderThickness="0"<br> CustomElementLoading="RadDocking_CustomElementLoading"<br> HasDocumentHost="False"><br> <br> <telerik:RadDocking.DockingPanesFactory><br> <local1:ShellDockingPanesFactory /><br> </telerik:RadDocking.DockingPanesFactory><br><br> <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft"><br> <telerik:RadPaneGroup HorizontalAlignment="Left" x:Name="leftGroup" telerik:RadDocking.SerializationTag="leftGroup"/><br> </telerik:RadSplitContainer><br> <telerik:RadSplitContainer InitialPosition="DockedRight" ><br> <telerik:RadPaneGroup HorizontalAlignment="Right" x:Name="rightGroup" telerik:RadDocking.SerializationTag="rightGroup"/><br> </telerik:RadSplitContainer><br> <telerik:RadSplitContainer InitialPosition="DockedBottom" ><br> <telerik:RadPaneGroup x:Name="bottomGroup" telerik:RadDocking.SerializationTag="bottomGroup"/><br> </telerik:RadSplitContainer><br> <telerik:RadSplitContainer InitialPosition="FloatingOnly" ><br> <telerik:RadPaneGroup x:Name="floatingOnlyGroup" telerik:RadDocking.SerializationTag="floatingOnlyGroup"/> <br> </telerik:RadSplitContainer><br> <telerik:RadSplitContainer InitialPosition="FloatingDockable" ><br> <telerik:RadPaneGroup x:Name="floatingDockableGroup" telerik:RadDocking.SerializationTag="floatingDockableGroup"/><br> </telerik:RadSplitContainer><br> <br> </telerik:RadDocking>
<p>public class ShellDockingPanesFactory : DockingPanesFactory<br> {<br> <br> protected override void AddPane(RadDocking radDocking, RadPane pane)<br> {<br> <br> var paneModel = pane as IPaneModel;<br> if (paneModel != null && !(pane is RadDocumentPane))<br> {<br> RadPaneGroup group = null;<br> switch (paneModel.Position)<br> {<br> case DockState.DockedRight:<br> group = radDocking.SplitItems.ToList().FirstOrDefault(i => i.Control.Name == "rightGroup") as RadPaneGroup;<br> if (group != null)<br> {<br> group.Items.Add(pane);<br> }<br> return;<br> case DockState.DockedBottom:<br> group = radDocking.SplitItems.ToList().FirstOrDefault(i => i.Control.Name == "bottomGroup") as RadPaneGroup;<br> if (group != null)<br> {<br> group.Items.Add(pane);<br> }<br> return;<br> case DockState.DockedLeft:<br> group = radDocking.SplitItems.ToList().FirstOrDefault(i => i.Control.Name == "leftGroup") as RadPaneGroup;<br> if (group != null)<br> {<br> group.Items.Add(pane);<br> }<br> return;<br> case DockState.FloatingOnly:<br> var foSplitContainer = radDocking.GeneratedItemsFactory.CreateSplitContainer();<br> group = radDocking.GeneratedItemsFactory.CreatePaneGroup();<br> foSplitContainer.Items.Add(group);<br> group.Items.Add(pane);<br> radDocking.Items.Add(foSplitContainer);<br> pane.MakeFloatingOnly();<br> return;<br> case DockState.FloatingDockable:<br> var fdSplitContainer = radDocking.GeneratedItemsFactory.CreateSplitContainer();<br> group = radDocking.GeneratedItemsFactory.CreatePaneGroup();<br> fdSplitContainer.Items.Add(group);<br> group.Items.Add(pane);<br> radDocking.Items.Add(fdSplitContainer);<br> pane.MakeFloatingDockable();<br> return;<br> case DockState.DockedTop:<br> default:<br> return;<br> }<br> }<br> base.AddPane(radDocking, pane);<br> }<br> }</p><p></p>
Hi,
I'm able to reproduce this error "Cannot change or check the contents or Current position of the QueryableCollectionView while Refresh is being deferred" even on the latest release. The exception is caught only if we use exceptional handling (try, catch).
I'm using QueryableDataServiceCollectionView with autoload set to true. Now, I am using DeferRefresh() to defer the irrelevant web requests that go out when I make any changes on RadGridView (i.e changing sort, filter descriptors and column index).
My problem here occurs when we are trying to change the index of the gridview column. The process is exiting from the PersistenceManager.Load() operation (because of the exception) and skipping the remaining part of execution. Henceforth, it also exits the DeferRefresh() which in turn sends out an irrelevant query to the database, overriding my gridview with different data.
In the sample project that I'm attaching, I couldn't reproduce the same situation by using QueryableDataServiceCollectionView as it needs a DataServiceContext and DataServiceQuery.
Please provide any fix for this exception.
Here is the link to my sample project:
https://hexmet-my.sharepoint.com/:u:/g/personal/shravya_kusuma_hexagon_com/EXier5S_YydBr9eljF9NN64BCFM_TUqJQ73F5ojPxDM15Q
Thanks,
Mohan.

I've got a RadCartesianChart3D that uses a SurfaceSeries3D to show a colorized surface I've attached a sample image to show how it looks now ("Current_Surface.png")
This all works very well and looks great. It produces the image I referred to above.
Here is the XAML I use.
<tk:RadCartesianChart3D.Series> <tk:SurfaceSeries3D ItemsSource="{Binding Points}" XValueBinding="X" YValueBinding="Y" ZValueBinding="Z" x:Name="Series" > <tk:SurfaceSeries3D.Colorizer> <tk:SurfaceSeries3DValueGradientColorizer x:Name="Colorizer" IsAbsolute="False" /> </tk:SurfaceSeries3D.Colorizer> </tk:SurfaceSeries3D></tk:RadCartesianChart3D.Series>And here is how my XAML builds the GradientStops
// "Colors" is an array of 64 custom colors.// Return an evenly distributed array of them for gradient stops. var step = 1.0 / Colors.Length; var stops = Colors.Select((color, index) => new GradientStop(color, index * step)); return new GradientStopCollection(stops);
But now I have a new requirement. I need to add a RadSlider that allows the user to dynamically change the colors instantaneously. The slider sets "cut-off" values distribution of the colors, limiting the range to a subset of 1.0. The visual effect is to highlight certain values. Basically I am emulating something that is already done a different application of ours (that app uses OpenGL).
To illustrate, I have also attached an image ("Desired_Surface.png") of this alternate application (the one that already has this slider) and the same surface showing. You can see the the user has adjusted the bottom slider upwards and this has totally compressed the color distribution. (You can even see the compressed distribution in the slider itself, though I don't need that).
My problem is that I cannot see how to emulate this with SurfaceSeries3D without using Deferred Dragging . The user needs to see the colors change immediately as he/she adjusted either of the sliders indicators; But the only way I can see to implement this is far too slow for anything but deferred dragging.
First I tried binding the Colorizer's GradientStop property. As you no doubt already know, that is not allowed by WPF
<tk:SurfaceSeries3D.Colorizer> <tk:SurfaceSeries3DValueGradientColorizer IsAbsolute="False" GradientStops="{Binding GradientStops}"/>
Then I tried declaring all 64 gradient stops directly in XAML and binding each one's GradientStop.Offset to a backing view-model property but that is also not allowed (because Gradient stops must be Freezable and always sorted)
<tk:SurfaceSeries3D.Colorizer> <tk:SurfaceSeries3DValueGradientColorizer IsAbsolute="False"> <tk:SurfaceSeries3DValueGradientColorizer.GradientStops> <GradientStopCollection> <GradientStop Color="sc# 1.0, 0.0, 0.0, 0.5625" Offset="{Binding Offset_0}"/> <GradientStop Color="sc# 1.0, 0.0, 0.0, 0.6250" Offset="{Binding Offset_1}"/>So the only way I could get this working was to completely rebuild the entire Colorizer every single time the user adjusts the slider. I construct 64 new Gradient stops with the new Offset values and put them into a new GradientStop collection. Unfortunately, this is far, far too laggy and slow. It's too much work to do for a slider drag. So I am left with using deferred dragging. But that's not what my boss wants.
Is there any other approach I might take to speed up the adjustment of the colors?

for (int i = 0; i < 20; i++) { chart.Annotations.Add ( new CartesianGridLineAnnotation { Axis = chart.HorizontalAxis, Value = i, Margin = new Thickness (0, topMargin, 0, topMargin), Stroke = this.m_supportLineBrush, StrokeThickness = 1, Label = $"Dyanmic{i}", ClipToPlotArea = false, LabelDefinition = new ChartAnnotationLabelDefinition () { Location = ChartAnnotationLabelLocation.Right, HorizontalOffset = -15 } }); }I have a chart with dynamically created CartesianGridLineAnnotations with labels. In some cases these annotations are very close together and the labels overlap. How do I keep this from happening? Is there any kind of "Smart Label" for grid line annotation?
Here is a simple example you can use to simulate my problem
Hi,
Is there an existing implementation or some pointers on the best approach to achieve n levels of nested grids?
- I do not want to use the hierarchical grids as I want to be able to customise the row details template and make the nested grids quite minimal
- I cannot seem to find the correct events to load a Grid into the row details using an pre-defined template
- I would like to implement it from a behavior, thus far I can get the first level of nesting to occur fine, but I am unable to access the Grid object from the row details so I can re-bind the same events in a recursive manner.
Thanks,
Maurice
Hello, Telerik Support Team!
I am quite new with Telerik WPF components, so do not throw bricks at me if I ask some obvious questions.
So I try to create an application with PDFViewer. I have some PDF documents with their addresses in different places in some PC. These addresses are bounded to some controls (f.e. buttons). So I would like to click on the button for document 1 - and document 1 appears on screen, then I click on button for document 2 - and document 2 appears on screen and so on.
So, I red the previous topic (https://www.telerik.com/forums/radpdfviewer-document-binding-in-mvvm) - so I tried to fill my DocumentSource property in ModelView constructor and it works normally and PDFViewer shows document.
However, when I tried to bind some relaycommand, which changed DocumentSource property, to some button - after I clicked on this button in some unexplainable (just for me) reason document didn´t changed (however relaycommand was executed) and first document remains in PDFViewer on the screen.
Here is my method (from ModelView), which changed DocumentSource property:
---------------------------------------------------------------------------------------------------
private void LoadAnotherPDFDocument()
{
MemoryStream stream1 = new MemoryStream();
using (Stream input1 = File.OpenRead(AnotherPdfFilePath))
{
input1.CopyTo(stream1);
}
FormatProviderSettings settings1 = new FormatProviderSettings(ReadingMode.AllAtOnce);
PDFDocument = new PdfDocumentSource(stream1);
}
---------------------------------------------------------------------------------------------------
And here is my DocumentSourceProperty:
---------------------------------------------------------------------------------------------------
PdfDocumentSource _PDFDocument;
public PdfDocumentSource PDFDocument
{
get { return _PDFDocument; }
set
{
if (_PDFDocument != value)
{
_PDFDocument = value;
OnPropertyChanged(nameof(PDFDocument));
OnPropertyChanged(nameof(MyProperty));
}
}
}
---------------------------------------------------------------------------------------------------
And DocumentSource from xaml is really bounded to DocumentSource property:
---------------------------------------------------------------------------------------------------
<telerik:RadPdfViewer x:Name="pdfViewer"
telerik:RadPdfViewerAttachedComponents.RegisterSignSignatureDialog="True"
telerik:RadPdfViewerAttachedComponents.RegisterFindDialog="True"
Grid.Row="2"
telerik:RadPdfViewerAttachedComponents.RegisterSignaturePropertiesDialog="True"
telerik:RadPdfViewerAttachedComponents.RegisterContextMenu="True"
DocumentSource="{Binding PDFDocument,Mode=TwoWay}"/>
---------------------------------------------------------------------------------------------------
So, can you help me? How can I open different documents without clicking on open button (I have only predifined documents in my app so I dont want to allow user to browse in hard disk).
Thank you in addition!
Best regards,
Alexander Panteleev

