Telerik Forums
UI for WPF Forum
0 answers
86 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
112 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
129 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
103 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
123 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
122 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
276 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
111 views

The WPF demo doesn't load Cloud Upload:

 

Martin Ivanov
Telerik team
 answered on 10 Nov 2022
1 answer
156 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
1 answer
124 views

Hi

I am faced with the following problem.

The height is set in the style definition:

 <Style x:Key="clubsGridRowBackground"
			       BasedOn="{StaticResource GridViewRowStyle}"
			       TargetType="telerik:GridViewRow">
      <Setter Property="MinHeight" Value="70" />
</Style>

In the GridView parameters, the style is bound as follows:

  RowStyle="{StaticResource clubsGridRowBackground}"
If RowDetails is collapsed, than row height is 70, but if RowDetails  is expanded, than height becomes smaller (decreases to the old value). 

The problem is reproduced, for example, in a project RowDetailsTemplateSelector (samples for WPF) if you apply the style.

The same behavior occurs when used standard WPF DataGrid.

Is there a solution to this problem for Telerik RadGridView?

Vsevolod
Top achievements
Rank 1
Iron
Iron
 answered on 09 Nov 2022
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?