Telerik Forums
UI for WPF Forum
2 answers
197 views
Hi,

I am using informationlayer and visualization layer to render my data. I am also using PolygonData to create my shapes. Here i want to hide my entire layer at certain zoom level. I have used below mentioned function but it is not working properly on entire layer. If i use it for a single label for example then it properly hide and show this label.

I am using this

MapLayer.SetZoomRange(myLayer, new ZoomRange(13, 18));

I am also not able to use this for my individual item which is PolygonData because of DepedencyObject.

Please let me know if i am getting something wrong or can anyone provide any alternate solution to show entire layer at certain zoomrange.

Thanks
Waqas Habib
Waqas
Top achievements
Rank 1
 answered on 21 Jan 2014
1 answer
79 views
Hi there,

In my WPF project I'm using two RESX files in order to keep both english and spanish languages, freely chosen for the user

When I assign my SQL view on ItemsSource I get twice the name of the headers (logically, I get each header from V_Clientes2 object and then get each header in Columns collection.. For example: Header="{Resx RadGridViewCustomers_Nombre}")



I do not know how can I fix that... it is not acceptable at all, 'cause the user see "Name" and "Nombre" at the same time instead to see just one of them:

XAML:

  <telerik:RadGridView x:Name="dgvClientes" ItemsSource="{Binding V_Clientes2}" HorizontalAlignment="Left"
            Margin="10,44,0,-45" VerticalAlignment="Top" Height="531"
            Width="469" ColumnWidth="SizeToCells" PreviewMouseDoubleClick="dgvClientes_PreviewMouseDoubleClick" Grid.ColumnSpan="2" Grid.RowSpan="3">

            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Tipo}" Header="{Resx RadGridViewCustomers_Tipo}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Documento}" Header="{Resx RadGridViewCustomers_Doc}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Nombre}" Header="{Resx RadGridViewCustomers_Nombre}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Apellido1}" Header="{Resx  RadGridViewCustomers_PrimerApellido}" />

            </telerik:RadGridView.Columns>



Find attached one image where you can see this problem.

Thanks in advance for your time and advices,
Vera
Telerik team
 answered on 21 Jan 2014
1 answer
130 views
Picture of resized window is attached...

Application is opened in maximized mode.
I have RichTextBoxUI in TAB. On Button click tab with RichTextBox opens. 
If at some moment maximized window is resized and  then get back to maximized mode, every next button click, which opens tab, resizes main window to previous non-maximized size...

Win7 is my OS...
Missing User
 answered on 21 Jan 2014
5 answers
321 views

I'm creating a column chart with the x axis as a DateTimeContinuousAxis. Once the date range reaches sufficient length, the column widths do not get any smaller. Instead, they start overlapping each other. In my case, I have a about 85 points over a period of about 8 months with the axis MajorStepUnit set to Days.  You can see in the first attachment, a screenshot of the chart where the column backgrounds are blue and the borders are red.  My expectation is that the column width should shrink as more columns are added & that there should be no overlapping.  Any guidance here would be appreciated. Thanks - Mitch.


Below are the xaml and code behind for creating the attached screenshot (I can send the project if desired):



XAML:



<Window x:Class="MathNETTest.MainWindow"
        xmlns:local="clr-namespace:MathNETTest"
        Title="MainWindow" Height="750" Width="925" >
 
    <Window.Resources>
 
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MathNETTest;component/Themes/Windows8/Telerik.Windows.Controls.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/MathNETTest;component/Themes/Windows8/Telerik.Windows.Controls.DataVisualization.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/MathNETTest;component/Themes/Windows8/Telerik.Windows.Controls.Chart.xaml"/>
            </ResourceDictionary.MergedDictionaries>
 
            <Style TargetType="{x:Type telerik:BarSeries}" BasedOn="{StaticResource BarSeriesStyle}">
                <Setter Property="PointTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <Border Background="Blue" BorderBrush="Red" BorderThickness="1">                               
                            </Border>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>              
            </Style>
        </ResourceDictionary>
    </Window.Resources>
 
    <Grid>                     
        <telerik:RadCartesianChart x:Name="MyChart">
             
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeContinuousAxis LabelFitMode="Rotate"/>
 
            </telerik:RadCartesianChart.HorizontalAxis>
             
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
 
            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorLinesVisibility="XY">
 
                    <telerik:CartesianChartGrid.MajorXLineStyle>
                        <Style TargetType="Line">
                            <Setter Property="Stroke" Value="Black"/>                              
                        </Style>
                    </telerik:CartesianChartGrid.MajorXLineStyle>
 
                    <telerik:CartesianChartGrid.MajorYLineStyle>
                        <Style TargetType="Line">
                            <Setter Property="Stroke" Value="Black"/>                           
                        </Style>
                    </telerik:CartesianChartGrid.MajorYLineStyle>
 
                </telerik:CartesianChartGrid>
            </telerik:RadCartesianChart.Grid>
 
        </telerik:RadCartesianChart>
    </Grid>
</Window>




Code behind:



using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Numerics;
using Telerik.Windows.Controls.ChartView;
 
namespace MathNETTest
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public ObservableCollection<MySeries> Series { get; set; } 
        public ChartSeriesProvider SeriesProvider { get; set; }
 
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = this;
 
            ObservableCollection<MyPoint> points = new ObservableCollection<MyPoint>();
            MyPoint p = new MyPoint(new DateTime(2012, 9, 2), 4); points.Add(p);
            p = new MyPoint(new DateTime(2012, 9, 3), 6); points.Add(p);
            p = new MyPoint(new DateTime(2012, 9, 4), 4); points.Add(p);
            p = new MyPoint(new DateTime(2012, 9, 5), 3); points.Add(p);
            p = new MyPoint(new DateTime(2012, 9, 6), 1); points.Add(p);
            p = new MyPoint(new DateTime(2012, 9, 30), 3); points.Add(p);
            p = new MyPoint(new DateTime(2012, 10, 1), 1); points.Add(p);
            p = new MyPoint(new DateTime(2012, 10, 2), 2); points.Add(p);
            p = new MyPoint(new DateTime(2012, 10, 3), 3); points.Add(p);
            p = new MyPoint(new DateTime(2012, 10, 4), 1); points.Add(p);
            p = new MyPoint(new DateTime(2012, 10, 28), 4); points.Add(p);
            p = new MyPoint(new DateTime(2012, 10, 29), 2); points.Add(p);
            p = new MyPoint(new DateTime(2012, 11, 25), 2); points.Add(p);
            p = new MyPoint(new DateTime(2012, 12, 30), 5); points.Add(p);
            p = new MyPoint(new DateTime(2012, 12, 31), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 1), 2); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 2), 3); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 3), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 7), 2); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 8), 2); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 9), 3); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 10), 2); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 13), 3); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 14), 14); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 15), 6); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 16), 9); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 17), 5); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 20), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 21), 6); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 22), 6); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 23), 8); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 24), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 28), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 29), 20); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 30), 17); points.Add(p);
            p = new MyPoint(new DateTime(2013, 1, 31), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 3), 2); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 4), 15); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 5), 7); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 6), 10); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 7), 10); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 8), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 11), 6); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 12), 6); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 13), 9); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 14), 6); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 17), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 18), 9); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 19), 5); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 20), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 21), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 22), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 24), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 25), 11); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 26), 7); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 27), 8); points.Add(p);
            p = new MyPoint(new DateTime(2013, 2, 28), 8); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 1), 6); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 3), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 4), 13); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 5), 11); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 6), 10); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 7), 11); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 8), 5); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 10), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 11), 2); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 12), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 13), 6); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 14), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 15), 11); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 16), 10); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 17), 8); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 18), 5); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 19), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 20), 7); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 21), 3); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 23), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 25), 4); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 26), 2); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 27), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 3, 28), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 4, 9), 2); points.Add(p);
            p = new MyPoint(new DateTime(2013, 4, 18), 1); points.Add(p);
            p = new MyPoint(new DateTime(2013, 5, 20), 1); points.Add(p);
 
            this.Series = new ObservableCollection<MySeries>();
            MySeries series = new MySeries();
            series.Points = points;
            this.Series.Add(series);
 
            this.SeriesProvider = new ChartSeriesProvider();
            this.SeriesProvider.Source = this.Series;
 
            CategoricalSeriesDescriptor sd = new CategoricalSeriesDescriptor();
            sd.CategoryPath = "X";
            sd.ValuePath = "Y";
            sd.ItemsSourcePath = "Points";
            sd.CollectionIndex = 0;
            sd.TypePath = "TelerikSeriesType";
 
            this.SeriesProvider.SeriesDescriptors.Add(sd);
 
            this.MyChart.SeriesProvider = this.SeriesProvider;
        }
    }
 
    public class MySeries
    {
        public MySeries()
        {
            this.TelerikSeriesType = typeof(BarSeries);
        }
        public SolidColorBrush Color { get; set; }
        public ObservableCollection<MyPoint> Points { get; set; }
 
        public Type TelerikSeriesType{get; set;}
    }
 
    public class MyPoint
    {
        public MyPoint(DateTime x, double y)
        {
            X = x;
            Y = y;
        }
 
        public DateTime X { get; set; }
        public double Y { get; set; }
    }
}




Yavor
Telerik team
 answered on 21 Jan 2014
5 answers
309 views
I have a user control that contains a RadDataForm and a button.

The button is bound to a custom command that has xxx_CanExecute() and xxx_Executed() methods defined.

I want xxx_CanExecute() to set e.CanExecute to false, if the form has any validation errors.  I'm getting the user control passed as sender, and from that I can get a reference to the RadDataForm.  But I can't for the life of me figure out how to tell if the form has any validation errors.  In the debugger I can see a validationErrors collection on the form, but that seems to be private. ValidateItem() always returns true, regardless.

Seems to me that I'm missing something simple.  Can someone point me in the right direction?
Vera
Telerik team
 answered on 21 Jan 2014
1 answer
168 views
Hi,

I upgraded from version 2012.3.1129.40 to 2013.3.1204.40.
With this new version I didn't find how to prevent from removing a node after drag & drop.
In the older version I was able to do it with:
public MyView()
{
  InitializeComponent();
  this.m_cellTreeView.PreviewDragEnded += this.OnPreviewDragEnded;
}
  
private void OnPreviewDragEnded(object sender, RadTreeViewDragEndedEventArgs e)
{
  e.Handled = true;
}

With the new version, I'm using your recommendations: I use the DragDropManager class only, I set the DragDropExecutionMode to New but the PreviewDragEnded handler is not called anymore and the event PreviewDragEnded is marked as deprecated.
What is the best way to do this ?

Thanks,
Boris
Telerik team
 answered on 20 Jan 2014
1 answer
579 views
Hi,

In the purchase section it says: 
  • 1 License for a single-named user.
In the license agreement it says:  
1.2 Scope of Use.
 The Software is licensed, not sold, on a per-seat basis. You may only allow the number of individuals in Your organization to use the Software that corresponds to the maximum number of License seats You have purchased from Telerik hereunder. This means that at any given time, the number of individuals authorized to use the Software under the License (each a “Licensed Developer”) cannot exceed the number of License seats that You have purchased from Telerik and for which You have paid Telerik all applicable License Fees pursuant to this Agreement. The Software is in “use” on a computer when it is loaded into temporary memory (i.e. RAM) or installed into permanent memory (e.g. hard disk or other storage device) of that computer for development purposes. Your Licensed Developers may install the Software on multiple machines, so long as the Software is not being used simultaneously for development purposes at any given time by more Licensed Developers than You have License seats...

The first seems to mean that if someone takes over GUI development in a project, we need a new license, the second seems to imply it's like a floating license and only the number of users, no matter who they are, must not exceed the number of licenses.

Which is it?
Deni
Telerik team
 answered on 20 Jan 2014
1 answer
214 views
Hi,
I would like to create a new RadGridViewColumn similar to GridViewComboBoxColumn.
The new column should contains a TreeView inside the dropdown to show the ItemsSource in hierarchical mode.
Is it possible to obtain this? Can you post me an example?

Thanks.
Hristo
Telerik team
 answered on 20 Jan 2014
1 answer
155 views
Hello;

Is it possible to open a child window from a tile view item. I have defined a button in the normal view, then tried to bind the click to a command that will open a child window. I tried in different ways : using event, using showDialog but seems not working from the tileview item. It worked fine from a normal WPF application.

Please let me know if it is possible. I spend the whole trying but not results.
FYI, I use MVVM & WPF

Thanks for your support
Samira
Boris
Telerik team
 answered on 20 Jan 2014
2 answers
285 views
This error is happening consistently on plotting series in "one of the user machine." Its working fine on other machines..

We are using Telerik.Windows.Controls.Charting, File version is 2013.1.220.40.
This also seems to be happening when HP Unified Function Testing tool is on.

Is this a known issue? Any help is appreciated.

Method: App.HandleException
Exception Method: Enumerable.SingleOrDefault
Message: Sequence contains more than one element


Stack Trace:    at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
   at Telerik.Windows.Automation.Peers.ScatterLineSeriesAutomationPeer.GetChildrenCore()
   at System.Windows.Automation.Peers.AutomationPeer.EnsureChildren()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(Int32 invalidateLimit)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateChildren()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   at System.Windows.ContextLayoutManager.fireAutomationEvents()
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)"



Peshito
Telerik team
 answered on 20 Jan 2014
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?