Telerik Forums
UI for WPF Forum
4 answers
201 views
The version of Telerik UI for WPF that is currently bundled with an application I am working on is 2014.1.0224.40.

This version number does not seem to map to your version scheme for you quarterly releases (n.x.yy.zzzz). Can you tell me if version 2014.1.0224.40 is equivalent to a specific release of Telerik UI for WPF?

I am doing some feasibility work for a reporting framework and was evaluating Telerik Reports for WPF. Telerik Reports for WPF has some dependencies on components of Telerik UI for WPF, but I want to match the versions of the components (Reporting and UI) and I can't find a corresponding Telerik Reports for WPF version.
kaczmar2
Top achievements
Rank 1
 answered on 16 Feb 2015
1 answer
144 views
Hello Support,

     <telerik:RadCartesianChart.Behaviors>
            <telerik:ChartTrackBallBehavior ShowIntersectionPoints="True" TrackInfoUpdated="ChartTrackBallBehavior_TrackInfoUpdated" />
            <telerik:ChartSelectionBehavior DataPointSelectionMode="Single" SelectionChanged="RadChart1_SelectionChanged" />
         </telerik:RadCartesianChart.Behaviors>


<!-- This code does not work, when i click on all of the points on the line, i never have the event triggered  -->
         <telerik:ScatterLineSeries ItemsSource="{Binding LineProfileDataValues}"
                                  YValueBinding="RedBandOrMonoValue" XValueBinding="PixelNumber" Stroke="Red" Width=".5" TrackBallTemplate="{StaticResource trackBallTemplateR}" IsHitTestVisible="True">


<!-- If i simple change from a LineSeries to a ScatterPointSeries, then the event is triggered and everything works correctly  -->
         <telerik:ScatterPointSeries ItemsSource="{Binding LineProfileDataValues}"
                                  YValueBinding="RedBandOrMonoValue" XValueBinding="PixelNumber" TrackBallTemplate="{StaticResource trackBallTemplateR}" IsHitTestVisible="True">




Martin Ivanov
Telerik team
 answered on 16 Feb 2015
1 answer
96 views
Hello,

I am using the trackBallInfo template to show data very similar to the example in the Demo.
I would like the position of the Databox inside the chart to follow the Y of the mouse.  The reason is because, if my data goes into the high range they the trackballinfo covers the line and you cannot see the chart.

Is there a way to do this?
Pavel R. Pavlov
Telerik team
 answered on 16 Feb 2015
2 answers
175 views
Hi,

I'm currently trying to populate a RadDateTimePicker control with data during an automation test (using the Microsoft automation tests framework). I've succeeded in populating edit controls using the ValuePattern.Pattern - but using this with the RadDateTimePicker fails. The C# test code is (where HostAutomationElement is the root element of the ApplicationUnderTest):

string theDateWeNeedToSetAsAString = "01/01/2015";
HostAutomationElement.FindFirst(TreeScope.Descendants, new PropertyCondition(AutomationElement.AutomationIdProperty, "StartDate"))
ValuePattern valuePattern = StartDateDatePickker.GetCurrentPattern(ValuePattern.Pattern) as ValuePattern;
valuePattern.SetValue(theDateWeNeedToSetAsAString);

<telerik:RadDateTimePicker x:Name="StartDate"
                       Width="200" HorizontalAlignment="Left"
                       InputMode="DatePicker"
                       SelectedValue="{Binding StartDate, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True}"
                       AutomationProperties.AutomationId="TheStartDate"/>


The error I get is an ElementNotAvailableException and the inner exception of this says: "Operation is not valid due to the current state of the object." which is fired from :at System.Windows.Automation.ValuePattern.SetValue(String value)

Is there an alternative pattern I should be using for this?  Enumerating the available patterns for the control gives me:

ValuePatternIdentifiers.Pattern
ExpandCollapsePatternIdentifiers.Pattern
SynchronizedInputPatternIdentifiers.Pattern

I don't want to expand/collapse - and the SynchronizedInputPattern seems too low level. Is there something else I have to do to get data into the RadDateTimePicker control within a test environment?

Cheers,
Tom.
Georgi
Telerik team
 answered on 16 Feb 2015
2 answers
147 views
Hi all,

When i mailMerge in header and footer areas and export with DocxFormatProvider or XamlFormatProvider. Header mergefields are empty. They can't save.
Kammen
Telerik team
 answered on 16 Feb 2015
5 answers
381 views
I have to create some dynamic data fields inside RadDataForm so I've added an ItemsControl inside my RadDataForm. Please see code below for example. Everything works fine. A custom DataTemplateSelector checks a property called Value. If Value is of type string ItemsControl is using DataFormDataField template to display it with a TextBox. If Value is of type datetime ItemsControl is using DataFormDateField template to display it with a RadDatePicker. That's great but I'm having trouble with validation. I use Item level attribute-based validation as described in your documentation. This works perfect on usual data fields like the two shown below (ID and Name). But validation is not executed on my bound properties inside those mentioned DataTemplates. Inside every DataTemplate there is a DataBinding to property Value of my ViewModel. Just like ID and Name, Value also has Item level attribute-based validation ([Required(AllowEmptyStrings = false)]). When ID or Name are empty validation comes into place and I can not commit RadDataForm until I enter some text. That's what I want for my Value property, too. I hope this is understandable.


<!-- ID -->
<t:DataFormDataField Label="ID" Description="Todo" DataMemberBinding="{Binding ID, Mode=OneWay}">
    <t:DataFormDataField.Content>
        <t:RadWatermarkTextBox Text="{Binding ID, Mode=OneWay}" IsReadOnly="True" />
    </t:DataFormDataField.Content>
</t:DataFormDataField>
<!-- Name -->
<t:DataFormDataField Label="Name" Description="Todo" DataMemberBinding="{Binding Name, Mode=TwoWay, NotifyOnValidationError=True}">
    <t:DataFormDataField.Content>
        <t:RadWatermarkTextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" WatermarkContent="Please fill in your name" />
    </t:DataFormDataField.Content>
</t:DataFormDataField>
<!-- DYNAMIC DATA FIELDS -->
<ItemsControl ItemsSource="{Binding Source={StaticResource CollectionViewSource}}" Focusable="False">
    <ItemsControl.ItemTemplateSelector>
        <v:MyDataTemplateSelector>
            <!-- Text DataTemplate (Value is string so show it in DataFormDataField) -->
            <v:MyDataTemplateSelector.TextBoxDataTemplate>
                <DataTemplate>
                    <t:DataFormDataField Label="{Binding Label, Mode=OneWay}" Description="{Binding ToolTip, Mode=OneWay}" DataMemberBinding="{Binding Value, Mode=TwoWay, NotifyOnValidationError=True}">
                        <t:DataFormDataField.Content>
                            <t:RadWatermarkTextBox Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" WatermarkContent="Please insert value" />
                        </t:DataFormDataField.Content>
                    </t:DataFormDataField>
                </DataTemplate>
            </v:MyDataTemplateSelector.TextBoxDataTemplate>
            <!-- Date DataTemplate (Value is datetime so show it as DataFormDateField) -->
            <v:MyDataTemplateSelector.DateDataTemplate>
                <DataTemplate>
                    <t:DataFormDateField Label="{Binding Label, Mode=OneWay}" Description="{Binding ToolTip, Mode=OneWay}" DataMemberBinding="{Binding Value, Mode=TwoWay, NotifyOnValidationError=True}">
                        <t:DataFormDateField.Content>
                            <t:RadDatePicker DateSelectionMode="Year" SelectedValue="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                        </t:DataFormDateField.Content>
                    </t:DataFormDateField>
                </DataTemplate>
            </v:MyDataTemplateSelector.DateDataTemplate>
            <!-- More DataTemplates here ... -->
        </v:MyDataTemplateSelector>
    </ItemsControl.ItemTemplateSelector>
</ItemsControl>


Can you help me on this? I don't know what I am doing wrong here. It seems my validation rules/data annotations are just not recognized by RadDataForm when the binding is inside a DataTemplate.
​
Ivan Ivanov
Telerik team
 answered on 16 Feb 2015
4 answers
434 views
I have a list of 'Setting' objects in a ViewModel a RadPropertyGrid is bound to. I use OnLoaded event to populate PropertyDefinitions of the RadPropertyGrid with 'Setting' items from the list by creating a PropertyDefinition for each item. DisplayName and Description for each PropertyDefinition created from a 'Setting' object are set  correctly but I cannot set the Binding to display the actual value to be edited. Here is my code:

  foreach (var setting in vm.Settings)
  {     
      Binding myBinding = new Binding();
      myBinding.Source = setting;
      myBinding.Path = new PropertyPath("SomeProperty");
      var pd = new PropertyDefinition();
      pd.Binding = myBinding;
      pd.DisplayName = setting.Name;
      pd.Description = setting.Description;     
      ServerSettingsPropertyGrid.PropertyDefinitions.Add(pd);
  }

What am I doing wrong and how to properly set PropertyDefinition binding in code?
Dean
Top achievements
Rank 1
 answered on 13 Feb 2015
13 answers
356 views
Hi

I am building a custom polyline tool, all I want is to add points and have a preview of the line that is going to be added (check the GIF to see what I am trying to achieve).

Here is the tool:
public class PolylineShapeTool : ToolBase, IMouseListener
  {
      private LineSegment _currentLineSegment;
      private PathFigure _currentPathFigure;
      private PathSegmentCollection _currentPathSegmentCollection;
      private RadDiagramShape _currentShape;
 
      public PolylineShapeTool()
          : base("PolylineShapeTool")
      {
      }
 
      private RadDiagram Diagram
      {
          get { return Graph as RadDiagram; }
      }
 
      public bool MouseDown(PointerArgs e)
      {
          return false;
      }
 
      public bool MouseDoubleClick(PointerArgs e)
      {
          return false;
      }
 
      public bool MouseMove(PointerArgs e)
      {
          if (IsActive && _currentShape != null)
          {
              if (_currentLineSegment != null)
              {
                  var rect = CalculateRectFromBasePoint(e.TransformedPoint);
 
                  _currentLineSegment.Point = e.TransformedPoint;
                  _currentShape.Width = rect.Width;
                  _currentShape.Height = rect.Height;
              }
 
              return true;
          }
 
          return false;
      }
 
      public bool MouseUp(PointerArgs e)
      {
          if (IsActive)
          {
              _currentLineSegment = new LineSegment { Point = e.TransformedPoint };
 
              if (_currentPathSegmentCollection == null)
              {
                  _currentPathSegmentCollection = new PathSegmentCollection();
 
                  _currentPathFigure = new PathFigure
                  {
                      StartPoint = e.TransformedPoint,
                      Segments = _currentPathSegmentCollection,
                      IsFilled = false,
                      IsClosed = false
                  };
                   
                  var pathGeometry = new PathGeometry { Figures = new PathFigureCollection { _currentPathFigure } };
 
                  _currentShape = new RadDiagramShape { Geometry = pathGeometry};
 
                  Diagram.AddShape(_currentShape);
              }
 
              _currentPathSegmentCollection.Add(_currentLineSegment);
              _currentPathFigure.Segments = _currentPathSegmentCollection;
 
              return true;
          }
 
          return false;
      }
 
      protected override void OnDeactivated()
      {
          base.OnDeactivated();
 
          _currentShape = null;
          _currentLineSegment = null;
          _currentPathFigure = null;
          _currentPathSegmentCollection = null;
      }
 
      private Rect CalculateRectFromBasePoint(Point transformedPoint)
      {
          var width = Math.Abs(_currentShape.X - transformedPoint.X);
          var height = Math.Abs(_currentShape.Y - transformedPoint.Y);
          var x = Math.Min(_currentShape.X, transformedPoint.X);
          var y = Math.Min(_currentShape.Y, transformedPoint.Y);
 
          return new Rect(x, y, width, height);
      }
  }

The problem is that it isn't working as expected, despite setting the StartPoint of the PathFigure, the first line starts at (0,0).
What do I have to change in this or how could I create such tool?

Why I don't use the Path tool? Because I don't need Bezier curves and there's no preview for the current line.
Maurício
Top achievements
Rank 1
 answered on 13 Feb 2015
2 answers
106 views
If followed the Telerik ControlPanelItem "Column chooser" example. It works perfect, though now I have two entries for the GridViewSelectColumn and GridViewToggleRowDetailsColumn which I don't want to display. Is there a way to remove those from the columns list?
Heiko
Top achievements
Rank 1
Iron
Veteran
 answered on 13 Feb 2015
1 answer
285 views
Hello,

I have a local tile package file that has my basemap I can use in an offline application. A description of tile packages is given below:

http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/About_tile_packages/01700000004w000000/

Is it possible to have a custom map provider to be able to read this file and load it into the RadMap control? I did not find any existing examples doing this. Any help would be appreciated, thanks!
Martin Ivanov
Telerik team
 answered on 13 Feb 2015
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?