Telerik Forums
UI for WPF Forum
3 answers
252 views
Hi,

i use your orgchart example which is great, is it possible to create a contextmenu on each node?

thanks
best Regards
rene
Pavel R. Pavlov
Telerik team
 answered on 13 Sep 2013
3 answers
116 views
Hi Need a control which could allow drag drop and populate filed vertical rather then horizontal what we have in telerik datagrid view
also it should allow column and row at the same time .i am attaching the png file to see the outlook of control
if we drag drop the run in the grid it will fill vertical and populate it
Rosen Vladimirov
Telerik team
 answered on 13 Sep 2013
1 answer
171 views
I've been working with a chart and I've been running into a number of binding issues. The current exception I'm getting is 

"Cannot modify the data points that belong to a databound ChartSeries instance."
 at Telerik.Charting.ChartSeriesModel.OnDataPointsModified() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Chart\Engine\Series\ChartSeriesModel.cs:line 89

I'm using an MVVM programming model where the VM utilizes a timer to refresh all the chart data every 30 seconds. All the items I'm binding to are Observable Collections. The chart will operate over several hours without problem but running over the course of a few days the chart will crash. I need to be able to run the application continuously without crashing. 

Here is my view:
public partial class SystemStatusChart : UserControl
    {
        public SystemStatusChart()
        {
            InitializeComponent();
            vm = new SystemStatusChartViewModel();
            DataContext = vm;
 
            MainWindow.CloseDataContext += MainWindow_CloseDataContext;
        }
 
        void MainWindow_CloseDataContext()
        {
            vm = (SystemStatusChartViewModel)DataContext;
 
            if (vm != null)
            {
                vm.RefreshTimer.Stop();
                vm = null;
                DataContext = null;
            }
        }
        private SystemStatusChartViewModel vm;
    }


The view model is relatively long so I've made an abbreviated version. This should give you an idea of what I'm doing.
class SystemStatusChartViewModel : ViewModelBase
    {
        public Timer RefreshTimer;
 
        public SystemStatusChartViewModel()
        {
            RefreshTimer = new Timer();
            RefreshTimer.Elapsed += DataService;
            RefreshTimer.Interval = 1000;
            RefreshTimer.Enabled = true;
        }
 
        public async void DataService(object oEventArgs e)
        { 
	    RefreshTimer.Stop();

	    //Capture Data, error checking, logging
	    StatusData = temp1;		//update data
	    ForecastData = temp2;	//update data
            RefreshTimer.Start();         }         /// <summary>         /// The <see cref="StatusData" /> property's name.         /// </summary>         public const string StatusDataPropertyName = "StatusData";         private RadObservableCollection<StatusChartItem> _statusData = new RadObservableCollection<StatusChartItem>();         /// <summary>         /// Sets and gets the StatusData property.         /// Changes to that property's value raise the PropertyChanged event.          /// </summary>         public RadObservableCollection<StatusChartItem> StatusData         {             get             {                 return _statusData;             }             set             {                 if (_statusData == value)                 {                     return;                 }                 RaisePropertyChanging(StatusDataPropertyName);                 _statusData = value;                 LastUpdate = new ObservableCollection<DateTime>() { DateTime.Now };                 FirstUpdate = new ObservableCollection<DateTime>() { DateTime.Now.AddDays(-2) };                 RaisePropertyChanged(StatusDataPropertyName);             }         }         /// <summary>         /// The <see cref="ForecastData" /> property's name.         /// </summary>         public const string ForecastDataPropertyName = "ForecastData";         private RadObservableCollection<StatusChartItem> _forecastDataList = new RadObservableCollection<StatusChartItem>();         /// <summary>         /// Sets and gets the "ForecastData property.         /// Changes to that property's value raise the PropertyChanged event.          /// </summary>         public RadObservableCollection<StatusChartItem> ForecastData         {             get             {                 return _forecastDataList;             }             set             {                 if (_forecastDataList == value)                 {                     return;                 }                 RaisePropertyChanging(ForecastDataPropertyName);                 _forecastDataList = value;                 RaisePropertyChanged(ForecastDataPropertyName);             }         }

-Alan
Petar Kirov
Telerik team
 answered on 13 Sep 2013
2 answers
278 views
I'm trying to use the RadMaskedNumericInput control in non-masking mode, and using the StringFormat to define an integer. According to the Standard Numeric Format Strings article from Microsoft, which Telerik references for using string formats, I should use either a "D" or "d" for the format string to get the desired result. However on running the code where I set it to that I get an exception that says "Format specifier was invalid" with the following stack trace:

   at System.Number.FormatDouble(Double value, String format, NumberFormatInfo info)
   at System.Double.ToString(String format, IFormatProvider provider)
   at Telerik.Windows.Controls.RadMaskedNumericInput.CoerceTextNoMask(Nullable`1 value)
   at Telerik.Windows.Controls.RadMaskedNumericInput.CoerceText(Nullable`1 value, Int32& selectionStart)
   at Telerik.Windows.Controls.RadMaskedNumericInput.CoerceTextOverride(Int32& selectionStart)
   at Telerik.Windows.Controls.RadMaskedInputBase.CoerceText()
   at Telerik.Windows.Controls.RadMaskedInputBase.ProcessValueChanged()
   at Telerik.Windows.Controls.RadMaskedInputBase.OnFormatStringChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.Baml2006.WpfMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)

Is there any way to limit the box to integers in no-mask mode?  Thanks!
Robert
Top achievements
Rank 1
 answered on 12 Sep 2013
1 answer
112 views
Hello,

We discovered a case when the RtfDataProvider doesn't work properly. A project to reproduce this case is included here: TestSolution.

The project contains a test.msg which is an email containing a line. When the contents of this mail are copied to the richtextbox the dataprovider cannot convert the line and instead produces no rtf at all. Could you please fix this?

Regards,

Ivar Tiller
ReflexSystems

Petya
Telerik team
 answered on 12 Sep 2013
2 answers
489 views
hi there,

I'm loading a bunch of JPG files in one ListBox and then when the final user do doble-click mouse event my aim is just load the one JPG into Telerik control.
How can I do that??


Private Sub ListBox_MouseDoubleClick(sender As Object, e As MouseButtonEventArgs)
 
       Dim s As String = ""
 
       BodyWorkAndPaintingTool.?????????????  = TryCast(sender,ListBox).Items(0).ToString
   End Sub


  <telerik:RadImageEditorUI x:Name="BodyWorkAndPaintingTool" ContextMenuOpening="BodyWorkAndPaintingTool_ContextMenuOpening" Grid.ColumnSpan="4" Margin="10,49,33,10" Grid.Row="1" Grid.RowSpan="4">
            <telerik:RadImageEditorUI.ImageToolsSections>
                <telerik:ImageToolsSection Header="{Resx DisenadorBlur}"  >
 
                    <telerik:ImageToolItem ImageKey="Resize" Text="Resize" Command="commands:ImageEditorRoutedCommands.ExecuteTool">
                        <telerik:ImageToolItem.CommandParameter>
.....
.....
.....

Thanks in advance,
Petya
Telerik team
 answered on 12 Sep 2013
2 answers
181 views
Hi -

I have 2 user controls which are bound to the same ViewModel. See attached diagram. I am using the Aggregate Functions to get Sum,Count and average. 
UC2 - where the grid exists - doesnt need to show these aggregate values
UC1 - has textboxes which will be displaying the aggregate values. 

Since they both have the datacontext of the a same CommonViewModel - how can i set a property from UC2 of an aggregate value to a ViewModel Property - so then be leveraged in UC1. 

Obviously if I had to show the values in UC2 directly - then i can do XAMl based simple stuff like this - but this doesnt help me here - since I want to show these values in UC1 (and not UC2)
<StackPanel Grid.Row="1">
           <TextBlock Margin="10,0,0,0" Text="{Binding AggregateResults[\AppCount\].FormattedValue, ElementName=FIBRE_App_Stats}" />
           <TextBlock Margin="10,0,0,0" Text="{Binding AggregateResults[\GrandTotal\].FormattedValue, ElementName=FIBRE_App_Stats}" />
 </StackPanel>


Am attaching a complete working sample solution also to highlight the issue. Please see the CommonViewmodel and the 3 properties in there which i want to set with the aggregate value calculated from the gird in UC2.

Link for the working solution is as follows (since i cant upload it here) - https://github.com/pratikrshah/telerikaggsample


Can somebody please help

Thanks
Dimitrina
Telerik team
 answered on 12 Sep 2013
3 answers
320 views
Hello! 

I use EditorTemplate property of PropertyDefinition class for showing a combobox with instances of some class to set property value. It works well but - is it possible to use the same way for properties shown in the property grid inside CollectionEditorPicker control? Or maybe another way to get the same effect.

Thanks in advance,
Mikhail
Mikhail
Top achievements
Rank 1
 answered on 12 Sep 2013
6 answers
274 views
Hi,

I am trying to use RadRibbonView inside my user control.
And since RadRibbonView does not work unless we include RadRibbonWindow, I have tried to add it to my User control.

It is always giving exception.
"Set property 'System.Windows.Controls.ContentControl.Content' threw an exception.' Line number '6' and line position '14'."

Here is my Code:(XAML:)

<UserControl x:Class="TestTelerikRibbonApp.UserControlTab1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             Name="UCTestTab1"
             mc:Ignorable="d" 
             d:DesignHeight="330" d:DesignWidth="488">    
    
    <telerik:RadRibbonWindow>
        <telerik:RadRibbonView x:Name="rbvTest">
            <telerik:RadRibbonTab Header="RadRibbon" HorizontalAlignment="Left" Margin="0,0,0,0" Name="radRibbonTab" VerticalAlignment="Top">               
                <telerik:RadRibbonGroup Header="Home" Name="rgHome">
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
        </telerik:RadRibbonView>
    </telerik:RadRibbonWindow>
</UserControl>

Madhu
Top achievements
Rank 1
 answered on 12 Sep 2013
1 answer
293 views

Hello,

I‘d like to show  xml data (with xsd) in a RadGridView and edit its value. The values in the grid should allow only this data, which are allowed in xsd. For instance, for enum type I would like to have a ComboBox column.

 

In Xaml I have a following code:

 

<telerik:RadGridView x:Name="dataGrid" AutoGenerateColumns="True" CanUserResizeRows="True"> 
</telerik:RadGridView>
 
The xml data is loaded in a DataSet and connected to the grid:
 
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
        {
            var data = new DataSet();
            data.ReadXmlSchema(@"D:\Development\Data\IBISConfig.xsd");
            data.ReadXml(@"D:\Development\Data\IBISConfig.xml");
 
            dataGrid.DataMember = data.Tables[data.Tables.Count - 1].TableName;
            dataGrid.ItemsSource = data;
        }
 
 
The Xml file is shown as a hierachical data, but the data types in the columns are always strings. 
 
How can I change the column type, without to parse the xsd?

Best Regards
Marian
 
Dimitrina
Telerik team
 answered on 12 Sep 2013
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?