Telerik Forums
UI for WPF Forum
6 answers
203 views

Hi! I develop Prism 6 WPF MVVM application. I defined an ObservableCollection instance in Model, please see below:

public class DeviceStatusModel
    {
        #region Constructors
        public DeviceStatusModel()
        {
            SeriesData = new ObservableCollection<short>();
            SeriesData.Add(20);
            SeriesData.Add(30);
            SeriesData.Add(50);
            SeriesData.Add(10);
            SeriesData.Add(60);
            SeriesData.Add(40);
            SeriesData.Add(20);
            SeriesData.Add(80);
        }
        #endregion

        #region Properties
        public ObservableCollection<short> SeriesData { get; set; }
        #endregion
    }

Then in ViewModel I defined the property of type of DeviceStatusModel. Please see below:

    public class DeviceStatusViewModel : BindableBase
    {
        #region Fields

        private DeviceStatusModel _deviceStatusModel;

        #endregion

        #region Constructors

        public DeviceStatusViewModel()
        {
            this.DeviceStatusModel = new DeviceStatusModel();
        }

        #endregion

        #region Properties

        public DeviceStatusModel DeviceStatusModel
        {
            get { return this._deviceStatusModel; }
            set { this.SetProperty(ref this._deviceStatusModel, value); }
        }

        #endregion
    }

Then in View I wrote the next XAML, please see below:

<UserControl x:Class="DeviceStatus.Views.DeviceStatusView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:prism="http://prismlibrary.com/"             
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"             
             prism:ViewModelLocator.AutoWireViewModel="True">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <telerik:RadCartesianChart Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left" Margin="6,7,0,0" VerticalAlignment="Top">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:ScatterLineSeries ItemsSource="{Binding DeviceStatusModel.SeriesData}"/>
        </telerik:RadCartesianChart>

    </Grid>
</UserControl>

And eventually when aplication runs I see only next poor picture, please see "ChartViewScreenShot.PNG" file attached.

 

Eugene
Top achievements
Rank 1
 answered on 29 Feb 2016
1 answer
110 views

Hi!
Is there a way to _not_ enter the edit mode if the user changes the selected cell using the arrow keys or by pressing enter?
(Event if the user was in edit mode before). I want to get closer to the behavior of excel.

Alex

Stefan
Telerik team
 answered on 29 Feb 2016
4 answers
183 views
I'm experiencing an issue with the RadRibbonDropDownButton control where the DropDownContent is a ListBox with keyboard based navigation. I open the dropdown via the access key text, then use the arrow keys to select an item in the listbox, but when I press enter, nothing happens until I press another arrow key (or escape). At this point, the popup closes, but if I pressed an arrow key, it moves the selection prior to closing the popup. I'm not sure if I'm doing something wrong in my use of the control, or if this is a bug. Anyone have any experience with this?
Ivan
Telerik team
 answered on 29 Feb 2016
1 answer
138 views
Hi, I have many, many selected items and the box is growing huge. How do I implement the autocompletebox so that at lets say a max of 300 it'll start to display the scrollviewer. 
Yana
Telerik team
 answered on 29 Feb 2016
1 answer
183 views

Hi,

I need to find out if a selected range is a merged cell. For a merged Cell the Property IsSingleCell is false.

In my application scenario I need to know whether the FromIndex-cell is part of a merged cell. If it is part of a merged cell, then I need to know which cells belong to that range since I need to handle them if it was a single cell. If it's not merged than I have to handle it as a range.

 

There's some documentation about how to do it with RadSpreadProcessing, but unfortunately not in the RadSpreadSheet. Though there's stated that merging is supported.

 

Thanks,

Michael

Tanya
Telerik team
 answered on 26 Feb 2016
13 answers
201 views
Hi,

I have in my screen a RadGridView and a MaskedNumericInput, there is an option to add new rows in the grid, when i add a new row/change cell which is required, you cannot take the focuse out of the grid while there are validation errors, BUT - if there is a MaskedNumericInput which value is zero - when i try clicking it in the prevous situation, all UI freezes! 
please advise! it is URGENT!
I put bellow the code and xaml:




Thanks,
Rachel.
Petar Mladenov
Telerik team
 answered on 26 Feb 2016
1 answer
116 views
I know gridview can highlight the row by selection. Is that possible to highlight some rows based on some conditions(for example name==john will be hightlight) when create the data grid view and this will not related with the selection. How should I set this? Thanks very much for anyone can help
Dilyan Traykov
Telerik team
 answered on 26 Feb 2016
3 answers
45 views

Hello,

when using the Office2013 theme, the control looks the same, whether IsReadOnly is set to True or False...

Yana
Telerik team
 answered on 26 Feb 2016
3 answers
179 views
Hello Telerik team,

I am using a RadCartesianChart to display several series of data. These series are BarSeries created and added in code-behind, which have their ItemsSource set to a ChartDataSource. The ChartDataSources are created programmatically for each BarSeries. The ItemsSource of these ChartDataSources are set to Business objects.

My problem is now that the tooltip, which is defined in XAML, is no longer able to show information that was bound inside the ToolTipTemplate using <TextBlock Text={Binding DataItem.value} />. This was only possible when I assigned each BarSeries a Business object as ItemsSource, instead of using a ChartDataSource (which is necessary for sampling the data).

Can you give me the possibly super-easy solution? Is it only the Binding path that needs to be fixed?

Thanks,
Sven
Martin Ivanov
Telerik team
 answered on 26 Feb 2016
1 answer
128 views

Hello,

in the RibbonView_style.xaml source file, starting at line 5, there are the following trigger is defined:

<MultiDataTrigger>
    <MultiDataTrigger.Conditions>
        <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonWindow}, Path=IsWindowsThemeEnabled}" Value="True" />
        <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType=telerikRibbonView:RadRibbonWindow}, Path=IsTitleVisible}" Value="False" />
    </MultiDataTrigger.Conditions>
    <Setter Property="Foreground" Value="Black" />
</MultiDataTrigger>

 

If the RibbonView control is not inside a RadRibbonWindow, running the application in debug mode generates a binding error in the output window.

Worse, if the RadRibbonWindow is inside a window that inherits from RadRibbonWindow, it is also not found.

Conclusion: you had better setting this trigger by code, traversings the UI tree to look for the right control...

Milena
Telerik team
 answered on 26 Feb 2016
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
Slider
Expander
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
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?