Telerik Forums
UI for WPF Forum
1 answer
1.1K+ views

When inserting image to Richtextbox editor (UI for wpf demo application) through insert image command from Ribbon menu and save document as .rtf. Generated document size is more than (almost twice) of inserted image.

To reproduce this issue, insert any image (sample attached) and save as .rtf. When comparing document size with image size.

Image size is 2.94 MB

.rtf document size is 5.89 MB.

When I open image editor to resize image, I noticed that current image size is 51.5 MB (screenshot attached). Is this correct image size?

 

Another issue I found in Richtextbox editor is that pasting image from clipboard is not working. Same can be reproduced in demo app.

Is there work around to reduce the image size when inserting image from clipboard or inserting image. Also how I can enable paste image from clipboard.

Current behavior generates large .rtf document, which If import to wpf richtextbox editor or MS word then application hangs.

 

 

Dimitar
Telerik team
 answered on 15 Nov 2022
0 answers
84 views

When I create a MapPolygon and then I call SetView with the GeoBounds I get the correct zoom and center.

var polygon = new MapPolygon
{
    Points = points,
    ToolTip = toolTip,
    ShapeFill = new MapShapeFill
    {
        Stroke = new SolidColorBrush(Colors.Blue),
        StrokeThickness = 2,
        Fill = new SolidColorBrush(Color.FromArgb(0x5A, 0x80, 0x80, 0x80))
    }
};
RadMap.SetView(polygon.GeoBounds);

But when I create a MapEllipse and call SetView I get ZoomLevel = 1 and I don't understand why

var ellipse = new MapEllipse
{
    Width = (double)radius * 2,
    Height = (double)radius * 2,
    Stroke = new SolidColorBrush(Colors.Blue),
    StrokeThickness = 2,
    Fill = new SolidColorBrush(Color.FromArgb(0x5A, 0x80, 0x80, 0x80)),
    Location = points.ElementAt(0),
};
MapLayer.SetHotSpot(ellipse, new HotSpot { X = 0.5, Y = 0.5 });
RadMap.SetView(ellipse.GeoBounds);

Would appreciate help

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 updated question on 15 Nov 2022
4 answers
104 views

Hi,

I find this article about the Validation Tooltip being clipped when using the Material theme.

I'm experiencing the same issue with the Windows 11 theme. Is the Win11 theme not using the tooltip element either ?  The themes looks pretty close to each other so... is Win11 an extension of Material ? 

Thank you for your help.

 

Romain
Top achievements
Rank 2
Iron
Iron
 answered on 14 Nov 2022
1 answer
118 views
I have a two items in radtimeline for example item 0 and item 1. Both Items are 4 week long duration. Our radtimeline is also a week display for each month. Now Item 1 overlaps item 0 from 3rd week, in this scenario item 1 is not visible on timeline(there are many items on timeline apart from items discussing). Now item 1 will only be visible when I horizontally scroll the timeline view to start from item 1's start date. I have not included MinimumItemGap attribute to my timeline. 

Can we have a understanding regarding the attribute and why such scenario is occurring?
Martin Ivanov
Telerik team
 answered on 14 Nov 2022
1 answer
100 views

HI:

In the CloudUpload demo it uses a local service provider based on api.everlive.com but this link is broken. How can I run the demo? also how can I create the asp.net api to have it locally?

api.everlive.com

Martin Ivanov
Telerik team
 answered on 14 Nov 2022
1 answer
114 views

I use a RadCartesianChart3D for displaying a 3D graph. For copying this graph to Clipboard, I render the view model again and copy it to the Clipboard. But that copy does not contain the axis labels.

I use the following code to copy the view model to Clipboard:

            var data = new DataObject();

            var bitmap = RenderToBitmap(this);
            if (bitmap != null)
            {
                data.SetData(DataFormats.Bitmap, bitmap);
            }

            Clipboard.SetDataObject(data);

And RenderToBitmap is as follows:

        public BitmapSource RenderToBitmap(object viewModel, double dpi = 300.0)
        {
            var element = new Border()
            {
                Child = new ContentControl()
                {
                    Content = viewModel,
                },
                Background = new SolidColorBrush(Colors.White),
            };

            element.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
            element.Arrange(new Rect(element.DesiredSize));
            element.InvalidateVisual();
            element.UpdateLayout();

            var target = new RenderTargetBitmap((int)(element.ActualWidth * dpi / 96.0), (int)(element.ActualHeight * dpi / 96.0), dpi, dpi, PixelFormats.Default);

            target.Render(element);

            return BitmapFrame.Create(target);
        }

 

Why is the copy not containing the axis labels?

Martin Ivanov
Telerik team
 answered on 11 Nov 2022
1 answer
111 views

HI:

I want to create a custom api service to upload a file. In fact, I have one and works fine with postman. How Can I use it with CloudUpload?

Thanks in advance

Martin Ivanov
Telerik team
 answered on 10 Nov 2022
1 answer
252 views

I have the following ContexMenu:

Which has the following xaml:

<telerik:RadContextMenu.ContextMenu>
  <telerik:RadContextMenu Opened="RadContextMenu_Opened">
    <telerik:RadMenuItem Header="Add" Command="{Binding AddInstance}" IsEnabled="{Binding EpmModelEditModeEnabled}"
                    CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}}, Path=UIElement.SelectedItem}"
                    Visibility="{Binding EnableEditMode, Converter={StaticResource boolToVisibilityConverter}}"/>
    <telerik:RadMenuItem Header="Rename (F2)" Click="RenameItemMenu_Click" IsEnabled="{Binding EpmModelEditModeEnabled}"
                      Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}}, Path=UIElement.SelectedItems, Converter={StaticResource canRenameModelVisibilityConverter}}"/>
    <telerik:RadMenuItem Header="Delete" Command="{Binding DeleteObject}" IsEnabled="{Binding EditModeEnabled}"
                    CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}}, Path=UIElement.SelectedItems}"/>
    <telerik:RadMenuItem Header="Create Chart Analysis" Command="{Binding CreateChart}" 
                    CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}}, Path=UIElement.SelectedItems}"/>
    <telerik:RadMenuItem Header="Create Dataset Analysis" Command="{Binding CreateDataset}" 
                    CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}}, Path=UIElement.SelectedItems}"/>
    <telerik:RadMenuItem x:Name="ColumnsMenu" Header="Columns">
      <telerik:RadMenuItem.ItemTemplate>
        <HierarchicalDataTemplate>
          <MenuItem Header="{Binding Header}" IsCheckable="True" IsChecked="{Binding IsVisible, Mode=TwoWay}"/>
        </HierarchicalDataTemplate>
      </telerik:RadMenuItem.ItemTemplate>
    </telerik:RadMenuItem>
  </telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>

I need to know how do i change the size of the internal selection (in blue) to match the size of the external selection (in yellow), because when i click in the external selection the context menu closes.

At least, if it is not possible to change the size of the internal selection, i need that the context menu does not close when the external selection is clicked (adding StaysOpenOnClick="True" in the MenuItem inside of the <HierarchicalDataTemplate> does not work).

Martin Ivanov
Telerik team
 answered on 10 Nov 2022
1 answer
107 views

The WPF demo doesn't load Cloud Upload:

 

Martin Ivanov
Telerik team
 answered on 10 Nov 2022
1 answer
149 views

Hello, I'm having this simple issue, I said it all in the title.
I'm using the RadGridView with SelectionMode="Extended" and SelectionUnit="Cell".
I've attached a sample project that reproduces the issue.

Repro steps:

  • Select cell "Manchester"
  • Ctrl-click again on cell "Manchester"
  • It puts it in edition mode instead of deselecting it

I've found a workaround where I ctrl-click on another cell ("Cell B"), then ctrl-click on the initial cell ("Cell A"), then ctrl-click on "Cell B" again, so that both cells are deselected. From what I understand, this is because the behavior is different whether I ctrl-click on the last selected cell, or on any other selected cell.

How can I fix this? Thanks! :)

Dilyan Traykov
Telerik team
 answered on 09 Nov 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?