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.
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
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
Hello,
when using the Office2013 theme, the control looks the same, whether IsReadOnly is set to True or False...
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...