Telerik Forums
UI for WPF Forum
1 answer
125 views
Hi, I have an Application Menu within this structure:
<telerik:RadRibbonView>
   <telerik:RadRibbonView.ApplicationMenu  >
      <telerik:ApplicationMenu>
         <telerik:ApplicationMenu.Content>
            <Grid>...
In the code behind I fill the grid with an child of an RadTeeView:

 

RadTreeView tree = new RadTreeView();
tree.Items.Add(myTree);
myGrid.Children.Add(tree);

 

So far so good, every thing is working fine.

But how can I prevent that the menu closes when I left click (MouseDown) on the menu or the main window?

The Application Menu did not close when I left click on the:

-root element from my tree

-plus/arrow icon of on tree node

-element which was selected on the last visit

 

It would be nice to handle the closing of the app-menu by my self, is this possible?

Dinko | Tech Support Engineer
Telerik team
 answered on 01 Feb 2018
3 answers
87 views

Hi, 

I would like to change the colour of my Dropdownbutton inside radgridview, when the filter is active, because I want to make it more visible which filter is active in the moment. Anybody knows  how to find these settings ? I'm using VS 2013 PRO and I'm during the WPF telerik project.\

Best regards 

Kris

Stefan
Telerik team
 answered on 01 Feb 2018
2 answers
456 views

I need to add different type of cells (NumericUpDown,TextBox,Combobox) to same column in RadDataGrid. Could someone please help its very urgent.......

 

Thanks.

Luís Henrique
Top achievements
Rank 2
 answered on 31 Jan 2018
6 answers
156 views

Hello Telerik team,

I have written the following "Feature Request": ScheduleView: Provide methods to print its content with full paging Support.

At the moment I'm trying to print the "WeekView" (seven days) on two pages. On the first page the first four days and on the second the rest. To realize this I use a hidden RadScheduleView (name: printScheduleView). My plan is to create an image for each page. Currently I am using the PrintVisual method, but later I would like to use the PrintDocument method (public abstract DocumentPage GetPage(int pageNumber)).

Before the PrintVisual method is called, printScheduleView must be rendered correctly, which currently only works with a timer. printScheduleView.UpdateLayout method could not solve the problem. Even a dirty DoEvents (UIElement.UpdateLayout Method) didn't solve the problem completely.

The sample project on my OneDrive account shows the bad behavior.

Can you please help me find a good solution?

Regards,
Marco

Kalin
Telerik team
 answered on 31 Jan 2018
7 answers
218 views

I wanted to select my E:\ Drive in OpenFolderDialog and selected it on the left side, like I always do in Windows default dialogs.

Sadly this does not seem to be possible with your OpenFolderDialog. Instead, I had to click This Computer on the left side and select the drive on the right side.

Could this be changed? Is there maybe an option for it I didn't saw?

Thanks

Petar Mladenov
Telerik team
 answered on 31 Jan 2018
2 answers
167 views

Hi,

I create a program to modelize data. I use Save() function with serialize item (like TableShape Demo)

this my serialize function for my TableGraphSource :

public override void SerializeNode(NodeViewModelBase node, SerializationInfo info)
{
    base.SerializeNode(node, info);
 
    if (node is INodeSerializable)
    {
        info = (node as INodeSerializable).Serialize(info);
    }
}

each model have a Serialize method with his own parameters to serialize

It's the same for Deserialize TableGraphSource :

public override NodeViewModelBase DeserializeNode(IShape shape, SerializationInfo info)
       {
           NodeViewModelBase node = null;
           if (shape is TableShapeMulti)
           {
               var table = new TableModelMulti();
               node = table.Deserialize(info);
           }
           else if (shape is TableShape)
           {
               var table = new TableModel();
               node = table.Deserialize(info);
           }
           else if (shape is ShapeShape)
           {
               if (null != info["Content"])
               {
                   switch (info["Content"].ToString())
                   {
                       case "Controls.Entity.Models.ShapeModel":
                           var _sm = new ShapeModel();
                           node = _sm.Deserialize(info);
                           break;
                      ...
                       default:
                           var shapeModel = Activator.CreateInstance(Type.GetType(info["Content"].ToString()));
                           if (shapeModel is ShapeModel)
                               node = (shapeModel as ShapeModel).Deserialize(info);
                           break;
                   }
               }
 
           }
           else
           {
               var row = new RowModel();
               row.Deserialize(info);
               node = row;
           }
           if (null != node)
           {
               if (info["Position"] != null)
                   node.Position = Utils.ToPoint(info["Position"].ToString()).Value;
 
               if (info[this.NodeUniqueIdKey] != null)
               {
                   var nodeUniquekey = info[this.NodeUniqueIdKey].ToString();
                   if (!this.CachedNodes.ContainsKey(nodeUniquekey))
                   {
                       this.CachedNodes.Add(nodeUniquekey, node);
                   }
               }
           }
 
           return node;
       }

 

Saving is OK and Reloading is OK (all data are correctly affected) but i have a problem with ContainerShape : Width, Height, Position (X,Y) properties are not binding  anymore between shape and model when i reload diagram.

I use styleSelector to link shape with model (my app is based on TableShape demo for code structure)

Can you help me please ? Thanks

nicolasf
Top achievements
Rank 2
 answered on 31 Jan 2018
3 answers
1.1K+ views
I'm trying to get myself introduced into using the RadChartView here and I'm working from your demos on the matter but when I try building I get this compiler error: 

message: The type or namespace name 'Windows' does not exist in the namespace 'Spike.Telerik' (are you missing an assembly reference?)
file: GvsDefectsChartControl.xaml 19 26
project: Spike.Telerik.RadChartView

Apparently there's an assembly that needs to be referenced but the message isn't gibing me much of a hint on which one.
Also, on the whole, I think your demos are lacking in this area. None of the XAML examples I've seen includes the namespace declarations, just the rendered tags. Those all include custom (Telerik) namespaces. Fortunately I have Jetbrains Resharper to help me set up the correct namespace declarations but I'm still stuck with the above error.

This is my complete XAML:

<UserControl x:Class="Spike.Telerik.RadChartView.MyTestChartViewControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"
             xmlns:chartView="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             xmlns:GVS="clr-namespace:Spike.RADChart.GVS"
             d:DesignHeight="300" d:DesignWidth="300">
     
    <UserControl.Resources>
        <GVS:MyViewModel x:Key="_testVM"/>
    </UserControl.Resources>
     
    <Grid DataContext="{StaticResource _testVM}">
             
        <chart:RadCartesianChart >
 
            <chart:RadCartesianChart.HorizontalAxis>
                <chartView:DateTimeCategoricalAxis LabelRotationAngle="50" LabelFormat="HH:mm"/>
            </chart:RadCartesianChart.HorizontalAxis>
 
            <chart:RadCartesianChart.VerticalAxis>
                <chartView:LinearAxis />
            </chart:RadCartesianChart.VerticalAxis>
 
            <chart:RadCartesianChart.Series>
                <chartView:SplineSeries
                    ItemsSource="{Binding Path=Data}"
                    CategoryBinding="Time"
                    ValueBinding="Value"
                    />
 
            </chart:RadCartesianChart.Series>
             
        </chart:RadCartesianChart>
         
    </Grid>
</UserControl>


I would appreciate any help.
Thanks

Dinko | Tech Support Engineer
Telerik team
 answered on 31 Jan 2018
4 answers
125 views

Does anybody know what's the right way to remove the radwindow header from the tab navigation cycle?

 

<telerik:RadWindow IsTabStop="False">

is permitted but doesn't have the desired effect.

 

 

<telerik:RadWindow>

     <telerik:RadWindow.Header
        IsTabStop="False"
        >
        Manage Styles
    </telerik:RadWindow.Header>

Is not permitted... "Attribute is not allowed in property element"

 

 

Thanks

 

Michael
Top achievements
Rank 1
Veteran
 answered on 31 Jan 2018
14 answers
402 views

Hi, i'm using LinearAxis for TimeSpan values. Minimum = 1 second and Maximum - maybe 1000 days.

For values - ScatterLineSeries. In test with perfomance troubles ~500 points.

        <telerik:RadCartesianChart Zoom="10,1"

            Name="_chart" Palette="{StaticResource ScatterCustomPalette}">
            <telerik:RadCartesianChart.HorizontalAxis >
                <telerik:LinearAxis  IsStepRecalculationOnZoomEnabled="False" LabelFitMode="Rotate">
                    <telerik:LinearAxis.LabelTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Converter={StaticResource LinearAxisTimeSpanConverter}}" />
                        </DataTemplate>
                    </telerik:LinearAxis.LabelTemplate>
                </telerik:LinearAxis>
            </telerik:RadCartesianChart.HorizontalAxis>

            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis MajorStep="1"/>
            </telerik:RadCartesianChart.VerticalAxis>

            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartPanAndZoomBehavior x:Name="_panZoomBehavior" ZoomMode="Horizontal" DragToZoomThreshold="10" />
            </telerik:RadCartesianChart.Behaviors>
        </telerik:RadCartesianChart>

Real max zoom depends from data, Axis.Maximum/coef (>1).

Its wide range for axis X, so i update major step on zoom changing. 

        private void UpdateAxisMajorStep()
        {
            var xAxis = (LinearAxis) _chart.HorizontalAxis;

            double modelWidth = xAxis.Maximum - xAxis.Minimum;
            double viewWidth = xAxis.ActualWidth > 1
                ? xAxis.ActualVisibleRange.Maximum - xAxis.ActualVisibleRange.Minimum
                : modelWidth / _chart.Zoom.Width;
            xAxis.MajorStep = viewWidth / 10;
        }

Behaviour looks good, but when i'm trying zoom in with big factor perfomance slow down.

Chart shows 10 ticks and labels at horizontal axis, but looks like

    calculated labels count = Chart.ActualRange/MajorStep. 

For example Maximum = 500000, Visible range 0 - 5000 and MajorStep = 500, count of calculated labels =  1000. Perfomance becomes unusable. 

Martin Ivanov
Telerik team
 answered on 30 Jan 2018
5 answers
608 views

Hi,

I'm using the last version of telerik and I was trying to integrate the RadPdfViewerToolBar into RadPdfViewer

This is my code

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
    </Grid.RowDefinitions>
    <telerik:RadPdfViewerToolBar RadPdfViewer="{Binding ElementName=pdfViewer, Mode=OneTime}" />
     
    <telerik:RadPdfViewer Grid.Row="2" x:Name="pdfViewer" DataContext="{Binding CommandDescriptors, ElementName=pdfViewer}"                              
                            RenderOptions.BitmapScalingMode="HighQuality"     />
    <telerik:RadPdfViewerToolBar/>
</Grid>

 

I populate the pdfViewer on datacontext change

private void RootElement_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if (e.NewValue != e.OldValue)
            {
                pdfViewer.DocumentSource = new PdfDocumentSource(new Uri(e.NewValue.ToString()));               
            }
        }

 

As shown on the attachment, the toolbar it seems not related to the pdfviewer.

Another question. Is it possible to specify a page number when I open the pdf? Something like GotoPage xy

 

Thank you

Polya
Telerik team
 answered on 30 Jan 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?