Hi Team,
We have a parent window (RadRibbonWindow) which is being executed in a different app domain and then multiple child app domains opens a dialogs ( RadWindows).
Problem:
We can not set parent window from child windows as they are on different app domains. In MS controls we have functionality of WindowInteropHelper that can be used to define an owner but in case of RadWindow we have a content control.
I have tried to set the content from respective app domin like (RadButton) to be parent which is also from related app domin but displayed in the main application but things are not working.
Any Ideas how to manage it.
Regards

Hi Team,
I wanted to use the GridViewMultiColumnComboBoxColumn in my grid and bind it to data set which contain medium amount of data. The memory consumption is way more that I expected also it is taking alot more time to display the drop down. I switch to MultiColumnComboBox using template and it is working way better and can not see memory spikes.
Can you please help me on this. I am currently using Telerik version "2020.1.218"

My RadCartesianChart uses an AnnotationsProvider showing CartesianPlotBandAnnotations. I set the LabelDefinitions with a DefaultVisualStyle that had the text as I wanted it. And it honors every property I set except the text color. That gets ignored, no matter what I set it to.
I've attached an image that shows what it looks like. You can see the region labels (literally named "Top" and "Bottom"). They show up in Italics as I want and using the FontSize I want. But the color remains grey when I'm trying to set it to white.
Here's my label definition resource
<tk:ChartAnnotationLabelDefinition x:Key="BandLabelDefinition" Location="Inside" VerticalAlignment="Bottom"> <tk:ChartAnnotationLabelDefinition.DefaultVisualStyle> <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource TextBlockStyle}"> <Setter Property="FontSize" Value="{Binding Source={core:Settings}, Path=FontSizeSmall}"/> <Setter Property="FontStyle" Value="Italic"/> <Setter Property="Foreground" Value="White"/> </Style> </tk:ChartAnnotationLabelDefinition.DefaultVisualStyle></tk:ChartAnnotationLabelDefinition>
And here's the bit where I set it in the style of the CartesianPlotBandAnnotation
<Style x:Key="RegionBandStyle" TargetType="{x:Type tk:CartesianPlotBandAnnotation}"> <d:Style.DataContext> <x:Type Type="core:IProfileRegion" /> </d:Style.DataContext> <Setter Property="Label" Value="{Binding Name}"/> <Setter Property="LabelDefinition" Value="{StaticResource BandLabelDefinition}"/>What am I missing here? How may I set the font color in a label definition?
(Note: I also tried the approach of using the ChartAnnotationLabelDefinition.Template property instead of "DefaultVisualStyle". That didn't help at all)

I've noticed that if I have a child of a RadWindow that is currently in a validation error state, I cannot utilize the RadWindow's minimize, maximize or close buttons.
For example, a RadGridView with items that implement INotifyDataErrorInfo, when a new item is added, the new item's fields are invalid, but I cannot click the RadWindow's buttons unless I cancel out of the new row.
In addition, when adding debugging output to the events for the RadGridView's events, I've found that if I am in the middle of an edit in a cell, clicking any of the RadWindow's buttons causes it to fire the events for the cell and row edits ending prior to firing any of the RadWindow's events, such as clicking the close button fires the PreviewClosing event after the RadGridView's events.
Is there a way to give precedence to the RadWindow's buttons so they can be utilized regardless of the state of controls within the window and to run their events prior to controls in the RadWindow?

Hi,
I am trying specify RadDiagram Canvas size and I have two questions below.
Question 1)
When I set Width and Height of RadDiagram to large numbers,
ViewportRect.location of RadDiagramThumbnail is different.
Is this correct behavior and why is this happening?
Question 2)
With With and Height set, I am able to restrict the movement(or scroll?) of canvas to (0,0) and (width,height).
Below is the code I wrote to restrict the pan movement.
Now, I want to the same thing when I click and move mouse on RadDiagramThumbnail's ViewportRect.
How can I do this?
Thanks in advance.
Jaeho
MainWindow.xaml
<Grid x:Name="LyoutRoot">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<telerik:RadDiagram x:Name="xDiagram"
Width="5760"
Height="3240"
MouseMove="diagram_MouseMove"
PreviewMouseDown="diagram_MouseDown"
PreviewMouseUp="diagram_MouseUp"
PreviewPan="Diagram_OnPreviewPan"
>
<telerik:RadDiagramShape x:Name="Shape1"
Content="Shape1"
Geometry="{telerik:FlowChartShape ShapeType=Database1Shape}"
Position="100,80" />
<telerik:RadDiagramShape x:Name="Shape2"
Content="Shape2"
Position="200,180" />
<telerik:RadDiagramConnection Source="{Binding ElementName=Shape1}" Target="{Binding ElementName=Shape2}" />
</telerik:RadDiagram>
<telerik:RadDiagramThumbnail x:Name="xThumbnail"
Grid.Row="1"
Diagram="{Binding ElementName=xDiagram}">
<telerik:RadDiagramThumbnail.ViewportStyle>
<Style TargetType="Rectangle">
<Setter Property="Stroke" Value="Blue" />
</Style>
</telerik:RadDiagramThumbnail.ViewportStyle>
</telerik:RadDiagramThumbnail>
</Grid>''
MainWindow.xaml.cs
private bool isPanning = false;
private Point oldPosition;
private void Diagram_OnPreviewPan(object sender, PositionChangedRoutedEventArgs e)
{
e.Handled = true;
this.isPanning = true;
}
private void diagram_MouseDown(object sender, MouseButtonEventArgs e)
{
this.oldPosition = e.GetPosition(this);
}
private void diagram_MouseUp(object sender, MouseEventArgs e)
{
this.isPanning = false;
}
private void diagram_MouseMove(object sender, MouseEventArgs e)
{
if ((e.LeftButton == MouseButtonState.Pressed) || (e.RightButton == MouseButtonState.Pressed))
{
var position = e.GetPosition(this);
if (this.isPanning && (e.RightButton == MouseButtonState.Pressed || Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)))
{
RadDiagram diagram = sender as RadDiagram;
double xOffset = position.X - oldPosition.X;
double yOffset = position.Y - oldPosition.Y;
if (yOffset < 0)
{
int visibleHeight = (int)(diagram.DesiredSize.Height / diagram.Zoom);
double pos = diagram.Viewport.Top + visibleHeight;
if (pos - yOffset > diagram.ActualHeight)
{
yOffset += (int)((pos - yOffset) - diagram.ActualHeight);
}
}
else if (yOffset > 0)
{
if (diagram.Viewport.Top - yOffset < 0)
{
//e.Handled = true;
yOffset += (int)diagram.Viewport.Top - yOffset;
}
}
if (xOffset < 0)
{
int visibleWidth = (int)(diagram.DesiredSize.Width / diagram.Zoom);
double pos = diagram.Viewport.Left + visibleWidth;
if (pos - xOffset > diagram.ActualWidth)
{
//e.Handled = true;
xOffset += (int)((pos - xOffset) - diagram.ActualWidth);
}
}
else if (xOffset > 0)
{
if (diagram.Viewport.Left - xOffset < 0)
{
//e.Handled = true;
xOffset += (int)diagram.Viewport.Left - xOffset;
}
}
if (Math.Abs(xOffset) != 0 || Math.Abs(yOffset) != 0)
{
diagram.Position = new Point(diagram.Position.X + xOffset, diagram.Position.Y + yOffset);
}
oldPosition = new Point(oldPosition.X + xOffset, oldPosition.Y + yOffset);
}
}
}

I made a class inherited raddiagramshape class and add "Forename" and "ForenameHorizontalAlignment" to this.
I changed template of SettingsPaneView and I added Horizontal alignment for shape, you can see this in image below.
My template add is
<ListBox Grid.Column="0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Left" extensions:SettingsPaneView.EditorPropertyName="ForenameHorizontalAlignment" extensions:SettingsPaneView.EditorItemType="Shapes, Connections" extensions:SettingsPaneView.EditorValue="{Binding Path=SelectedIndex, RelativeSource={RelativeSource Self}, Mode=TwoWay, Converter={StaticResource HorizontalAlignmentConverter}}"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBoxItem> <!--Left Alignment--> <Path Width="26" Height="26" Stretch="Fill" Data="M 0,4L 24,4 M 0,10L 12,10 M 0,16L 24,16 M 0,22L 12,22 M 0,28L 24,28 M 0,0L 32,0L 32,32L 0,32L 0,0 Z" Stroke="Black" StrokeThickness="1.5"/> </ListBoxItem> <ListBoxItem> <!--Center Alignment--> <Path Width="26" Height="26" Stretch="Fill" Data="M 4,4L 28,4 M 10,10L 22,10 M 4,16L 28,16 M 10,22L 22,22 M 4,28L 28,28 M 0,0L 32,0L 32,32L 0,32L 0,0 Z" Stroke="Black" StrokeThickness="1.5"/> </ListBoxItem> <ListBoxItem> <!--Right Alignment--> <Path Width="26" Height="26" Stretch="Fill" Data="M 8,4L 32,4 M 19,10L 32,10 M 8,16L 32,16 M 19,22L 32,22 M 8,28L 32,28 M 0,0L 32,0L 32,32L 0,32L 0,0 Z" Stroke="Black" StrokeThickness="1.5"/> </ListBoxItem></ListBox>
and HorizontalAlignmentConverter is
[ValueConversion(typeof(System.Windows.HorizontalAlignment), typeof(int))]public class HorizontalAlignmentConverter : IValueConverter{ #region IValueConverter Members public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value != null) { switch ((int)value) { case 0: return System.Windows.HorizontalAlignment.Left; case 2: return System.Windows.HorizontalAlignment.Right; default: return System.Windows.HorizontalAlignment.Center; } } return System.Windows.HorizontalAlignment.Center; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value == null) return 1; System.Windows.HorizontalAlignment _value = (System.Windows.HorizontalAlignment)value; switch (_value) { case System.Windows.HorizontalAlignment.Left: return 0; case System.Windows.HorizontalAlignment.Right: return 2; default: return 1; } } #endregion}
when I add a shape into diagram and open settingpane I can change horizontal alignment of forename(for example change to left) but when again open sttingpane it show me center. I checked it and I see always Convertback value is null.?
how can I fix it?
I've got a simple RadCartesianChart with two Linear Axes and a scatter line plot. It represents a profile Each axis represents Millimeters. IThat chart auto fits the data to the screen space. I've attached an image to show what it looks like
But now I need to implement a checkbox that will switch the axes to what I am calling "Equal Scale" mode: So that 1 millimeter of my data in vertical space will take up the same physical screen space as 1 millimeter in horizontal space.
Is there a simple way to do this? Some property that I am missing, perhaps? I realize I can try to write the code-behind. but it seems awfully complicated -- I have to take into account the relative ActualWidth/ActualHeight properties of the control as as the relative Millimeter height and width of the data. And I have to make sure that I don't lose my nice even auto labels (or I have do do all the match to individually calculate them myself)
So is there a property/function that will let me achieve this already built in to ChartView?
-Joe
My issue might be similar to this one: https://www.telerik.com/forums/async-await-inside-row-validating-event
I'm wanting to validate by cell, as opposed to by row. Similar to the above, validation works fine when no async calls are made, but progresses as if the validation wasn't there as soon as there is an async call of any sort.
In my case, I'm wanting to use the Cell Validating event not strictly for validation, but rather to provide a prompt to the user and have them answer yes or no before progressing. But I need to be able to run the event with async/await as I am calling async methods.
I can slightly get around this by calling the async methods with in a synchronous-like way, by calling the Wait() method on a Task, for instance. But it is much less convenient to do so.
Is the Telerik UI for WPF library still unable to cope with async validating events like described in the above thread or is there a way to make this situation work?
// This would be preferredpublic async void CellValidating(GridViewCellValidatingEventArgs e){ var result = await this.Dispatcher.InvokeAsync(() => MessageBox.Show("Test", "Test", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.Yes)); if (result == MessageBoxResult.No) { e.IsValid = false; e.ErrorMessage = "This is an error"; }}// This is what I have to do insteadpublic void CellValidating(GridViewCellValidatingEventArgs e){ var op = this.Dispatcher.InvokeAsync(() => MessageBox.Show("Test", "Test", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.Yes)); _ = op.Wait(); var result = op.Result; if (result == MessageBoxResult.No) { e.IsValid = false; e.ErrorMessage = "This is an error"; }}
Hi,
I have built the linked project, but my custom command provider is not being called when I click Finish. Please help.
Here is the link: https://drive.google.com/open?id=1HcYu05M7GAPJOJQqfL_l7FYtEMNwhu8i
Thanks,
Thomas
