Hello!
The right behavior for using panes in Docking is like that: we set/modify PanesSource property, Panes property is initialized by using PanesSource and DockingPanesFactory, panes are created or removed. But when set PanesSource, try to load invalid layout and get an exception, Docking.Panes property is set to null and actual panes is not removed, because we don`t have them in Panes property. This behavior cause problems with resolving panes (because there are old panes in memory, that should have been removed). Can you suggest some sort of validation for layout or ways to clean old panes from memory?
Hello,
yesterday I installed the latest Visual Studio 2019 update and now I'm getting in the line
var dllStream = currentAssembly.GetManifestResourceStream(fullDllName);
a value of null (called in CurrentDomain_AssemblyResolve()). It was working good all the time.
I'm using the code posted here:
https://www.telerik.com/forums/how-to-display-controls-(like-radwindow)-at-design-time-when-noxaml-is-used-and-implicit-style-resources-are-in-a-custom-dll#Pz5cUcqhtk-t3EQHJuJYHg
public class TelerikThemeUtilities{ static TelerikThemeUtilities() { AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve; } public static void Initialize() { } public static bool GetDesignTime(DependencyObject obj) { return (bool)obj.GetValue(DesignTimeProperty); } public static void SetDesignTime(DependencyObject obj, bool value) { obj.SetValue(DesignTimeProperty, value); } public static readonly DependencyProperty DesignTimeProperty = DependencyProperty.RegisterAttached( "DesignTime", typeof(bool), typeof(TelerikThemeUtilities), new PropertyMetadata(false, DesignTimeChanged)); private static void DesignTimeChanged(DependencyObject target, DependencyPropertyChangedEventArgs args) { if (((bool)args.NewValue) && System.ComponentModel.DesignerProperties.GetIsInDesignMode(target)) { FrameworkElement element = target as FrameworkElement; LoadTelerikTheme(element.Resources, "Crystal"); } } public static void LoadTelerikTheme(string themeName) { Application.Current.Resources.Clear(); LoadTelerikTheme(Application.Current.Resources, themeName); } private static void LoadTelerikTheme(ResourceDictionary resources, string themeName) { resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.xaml", UriKind.RelativeOrAbsolute) }); resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.Input.xaml", UriKind.RelativeOrAbsolute) }); resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.Navigation.xaml", UriKind.RelativeOrAbsolute) }); resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.GridView.xaml", UriKind.RelativeOrAbsolute) }); resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Documents.xaml", UriKind.RelativeOrAbsolute) }); } private static System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) { var dllName = args.Name.Substring(0, args.Name.IndexOf(',')) + ".dll"; if (dllName.Contains("Telerik")) { var currentAssembly = System.Reflection.Assembly.GetExecutingAssembly(); var fullDllName = currentAssembly.GetName().Name + ".lib." + dllName; var dllStream = currentAssembly.GetManifestResourceStream(fullDllName); var streamBytes = new byte[dllStream.Length]; dllStream.Read(streamBytes, 0, streamBytes.Length); var requestedAssembly = System.Reflection.Assembly.Load(streamBytes); return requestedAssembly; } else { return null; } } }}
- $exception {"Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."} System.NullReferenceException+ Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary {System.Collections.ListDictionaryInternal} HResult -2147467261 int HelpLink null string+ InnerException null System.Exception Message "Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt." string Source "PsShell" string StackTrace " bei PsShell.TelerikThemeUtilities.CurrentDomain_AssemblyResolve(Object sender, ResolveEventArgs args) in C:\\Projects\\PSV\\PSV-Client\\source\\PsShell\\TelerikThemeUtilities.cs: Zeile64" string+ TargetSite {System.Reflection.Assembly CurrentDomain_AssemblyResolve(System.Object, System.ResolveEventArgs)} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}+ Statische Member + Nicht öffentliche Member + sender {Name:PsShell.exeKeine Kontextrichtlinien vorhanden.} object {System.AppDomain}+ args {System.ResolveEventArgs} System.ResolveEventArgs dllName "Telerik.Windows.Controls.resources.dll" string+ currentAssembly {PsShell, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null} System.Reflection.Assembly {System.Reflection.RuntimeAssembly} fullDllName "PsShell.lib.Telerik.Windows.Controls.resources.dll" string+ dllStream null System.IO.Stream streamBytes null byte[] requestedAssembly null System.Reflection.Assembly
Any ideas?
Best Regards,
Raul
Short question: is there a way to display the values of my datapoints in RadLegend besides the title? What I like to see is something like this:
coloured_rectangle -- DataPoint-Value -- DataPoint-Label
Regards
Heiko

This is probably just me not knowing how to make this control do this but...
I have a list of items and in-code I'm selecting an item that off-screen but RadListView doesn't auto-scroll to that item. it IS selected just not in view.
Do I have to do something like: radListView1.ShowSelectedItem(someRadListDataItem)
or perhaps from the item itself? Something that works like this: someRadListDataItem.EnsureVisible = True
??
Any help would be appreciated.
-c

Hi,
When I try to select C:\ drive as the destination folder (a.k.a FileName property) in RadOpenFolderDialog, it gets set to the location of the application it's running.
This only happens for C:\ drive and no other drives (e.g. D:\) or the subfolders in C:\ drive (e.g. C:\path).
Also, when I select C from "This PC", the destination correctly gets set to C (first attached file), but when when I select C while in C drive it gets incorrectly set (second attached file).
Is there any known issue about this?

To make entire tile area draggable, I applied following behavior on RadTileView-
<telerik:RadTileView IsItemsAnimationEnabled="False" x:Name="myTileView"
ItemsSource="{Binding AvailableChartList,UpdateSourceTrigger=Explicit}"
telerik:RadTileView.ItemContainerStyle="{DynamicResource RadTileViewItemStyle1}"
MaximizeMode="Zero">
<i:Interaction.Behaviors>
<local:RadTilesDragDropBehavior/>
</i:Interaction.Behaviors>
</telerik:RadTileView>
-----Behavior------
public class RadTilesDragDropBehavior : Behavior<RadTileView>
{
private int DragedElementInitialPosition;
private bool isDragging;
private int endPosition = -1;
private RadTileViewItem dragElement;
protected override void OnAttached()
{
base.OnAttached();
// Insert code that you would want run when the Behavior is attached to an object.
DragDropManager.AddDragInitializeHandler(AssociatedObject, OnDragInitialize);
DragDropManager.AddDragDropCompletedHandler(AssociatedObject, OnDragAndDropCompleted);
AssociatedObject.PreviewDragOver += MyTileView_PreviewDragOver;
AssociatedObject.PreviewTilePositionChanged += RadTileView_PreviewTilePositionChanged;
}
private void RadTileView_PreviewTilePositionChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
if (this.isDragging)
{
e.Handled = true;
var container = e.OriginalSource as RadTileViewItem;
if (container == this.dragElement)
{
this.endPosition = container.Position;
}
}
}
private void OnDragInitialize(object sender, DragInitializeEventArgs args)
{
this.isDragging = true;
var tileView = sender as RadTileView;
var tileViewItem = args.OriginalSource as RadTileViewItem;
this.dragElement = tileViewItem;
this.DragedElementInitialPosition = dragElement.Position;
if (tileViewItem != null && tileView != null)
{
args.Data = tileViewItem;
var draggingItem = new RadTileViewItem
{
Style=AssociatedObject.Resources["RadTileViewItemStyle1"] as Style,
Width = tileViewItem.RestoredWidth,
Height = tileViewItem.RestoredHeight
};
args.DragVisual = draggingItem;
tileViewItem.Opacity = 100;
args.AllowedEffects = DragDropEffects.Move;
args.Handled = true;
}
}
private void OnDragAndDropCompleted(object sender, DragDropCompletedEventArgs args)
{
if (args.OriginalSource.GetType() == typeof(RadTileViewItem))
{
this.isDragging = false;
Point pt = Util.CorrectGetPosition((RadTileView)sender);
HitTestResult result = VisualTreeHelper.HitTest(AssociatedObject, pt);
if (result != null)
{
DependencyObject obj = result.VisualHit.ParentOfType<RadTileViewItem>();
if (obj != null)
{
endPosition=((RadTileViewItem)obj).Position;
RadTileView parent = args.Source as RadTileView;
IEnumerable<RadTileViewItem> itemsToMove = null;
if (this.endPosition != -1)
{
if (this.DragedElementInitialPosition < this.endPosition)
{
var itemsCollection = ((IList<ChartDetail>)parent.ItemsSource);
itemsToMove = itemsCollection
.Select(i => parent.ItemContainerGenerator.ContainerFromItem(i) as RadTileViewItem)
.Where(c => c.Position > this.DragedElementInitialPosition && c.Position <= this.endPosition)
.OrderBy(c => c.Position);
foreach (var item in itemsToMove)
{
item.Position--;
}
}
else
{
for (int i = 0; i < this.DragedElementInitialPosition - this.endPosition; i++)
{
this.dragElement.Position--;
}
}
}
this.endPosition = -1;
}
else
{
draggingTile.Opacity = 100;
}
}
else
{
draggingTile.Opacity = 100;
}
}
}
private void MyTileView_PreviewDragOver(object sender, System.Windows.DragEventArgs e)
{
FrameworkElement container = sender as FrameworkElement;
if (container == null)
{
return;
}
double tolerance = 60;
double verticalPos = Util.CorrectGetPosition((RadTileView)container).Y;
double offset = 20;
ScrollViewer scrollViewer = AssociatedObject.FindChildByType<ScrollViewer>();
if (verticalPos < tolerance) // Top of visible list?
{
scrollViewer.ScrollToVerticalOffset(scrollViewer.VerticalOffset - offset); //Scroll up.
}
else if (verticalPos > container.ActualHeight - tolerance) //Bottom of visible list?
{
scrollViewer.ScrollToVerticalOffset(scrollViewer.VerticalOffset + offset); //Scroll down.
}
}
protected override void OnDetaching()
{
base.OnDetaching();
// Insert code that you would want run when the Behavior is removed from an object.
DragDropManager.RemoveDragInitializeHandler(AssociatedObject, OnDragInitialize);
DragDropManager.RemoveDragDropCompletedHandler(AssociatedObject, OnDragAndDropCompleted);
AssociatedObject.PreviewDragOver -= MyTileView_PreviewDragOver;
AssociatedObject.PreviewTilePositionChanged -= RadTileView_PreviewTilePositionChanged;
}
}
If I drag Tile By clicking anywhere on the tile and drop anywhere on the RadTileView, it works fine.
But If I try to drag the Tile by clicking on the header area(RadTileViewItem's default draggable area) and drop the tile out of RadTileView, Tile vanishes from the view. (Please refer the attached image to see the issue.)
Please, suggest a way to fix this issue or if there is any other way to make entire tile draggable.

Hello,
I have some problem with Export to Excel for DateTime Format Columns.
Set Column Format:
(this.myGrid.Columns["JPr_MinStart"] as GridViewDataColumn).DataFormatString = "dd/MM/yyyy hh:mm";
On ElementExportingToDocument:
01.private void myGrid_ElementExportingToDocument(object sender, GridViewElementExportingToDocumentEventArgs e)02.{03. if (e.Element == ExportElement.Cell)04. {05. var cellExportingArgs = e as GridViewCellExportingEventArgs;06. if (07. (cellExportingArgs.Column as GridViewDataColumn).UniqueName == "JPr_MinStart"08. )09. {10. (cellExportingArgs.Column as GridViewDataColumn).DataFormatString = string.Empty;11. var parameters = cellExportingArgs.VisualParameters as GridViewDocumentVisualExportParameters;12. parameters.Style = new CellSelectionStyle()13. {14. Format = new CellValueFormat("dd/MM/yyyy hh:mm")15. };16. }17. }18.}On ElementExportedToDocument
private void myGrid_ElementExportedToDocument(object sender, GridViewElementExportedToDocumentEventArgs e) {if (e.Element == ExportElement.Table){ (this.myGrid.Columns["JPr_MinStart"] as GridViewDataColumn).DataFormatString = "dd/MM/yyyy hh:mm";} }
If I set DateFormatString, the export to Excel is wrong. It export the value as String and Excel cannot recognize the DateTime column.
If i remove DateFormatString on Exporting and on Exported I set the DateFormat string, the Excel is right but the first line no!
I think that is a bug? My WPF version is: 2018.1.220.40
Thank you very much


