or
<
telerik:RadCartesianChart
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeContinuousAxis
MaximumTicks
=
"5"
PlotMode
=
"OnTicksPadded"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LineSeries
Name
=
"mS"
>
</
telerik:LineSeries
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartPanAndZoomBehavior
/>
</
telerik:RadCartesianChart.Behaviors
>
</
telerik:RadCartesianChart
>
public
MainWindow()
{
InitializeComponent();
for
(
int
i = 0; i < 100;i++ )
mS.DataPoints.Add(
new
Telerik.Charting.CategoricalDataPoint() { Category = System.DateTime.Today.AddDays(i), Value = 5 });
}
Hello,
I’ve found a strange behavior of the validation while cancel editing a cell. When I edit a cell and enter an invalid value it shows me, that there is an input error. Very nice and cool! But when I cancel the editing with the escape key, the cell resets the content to the previous value. If the previous value was invalid too, there is no error message.
Is there something I can do to fix the problem?
public
class
MyPropertyGridDataTemplateSelector : DataTemplateSelector
{
public
override
DataTemplate SelectTemplate(
object
item, DependencyObject container)
{
var pd = item
as
PropertyDefinition;
if
(pd !=
null
&& pd.SourceProperty.PropertyType ==
typeof
(
string
))
{
/* Something like this?
pd.Binding = new Binding
{
Path = new PropertyPath(pd.SourceProperty.Name),
Mode = BindingMode.TwoWay,
UpdateSourceTrigger = UpdateSourceTrigger.LostFocus
};
*/
return
FilePathDataTemplate;
}
return
null
;
}
public
DataTemplate FilePathDataTemplate {
get
;
set
; }
}
<
local:MyPropertyGridDataTemplateSelector
x:Key
=
"dataTemplateSelector"
>
<
local:MyPropertyGridDataTemplateSelector.FilePathDataTemplate
>
<
DataTemplate
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
/>
<
ColumnDefinition
Width
=
"Auto"
/>
</
Grid.ColumnDefinitions
>
<!-- This is where the problem begin... -->
<
TextBox
Text
=
"{Binding Path}"
Grid.Column
=
"0"
/>
<
Button
Content
=
"..."
Width
=
"25"
Height
=
"25"
Grid.Column
=
"1"
Command
=
"{Binding DataContext.OpenCommand, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
CommandParameter
=
"{Binding Path}"
/>
</
Grid
>
</
DataTemplate
>
</
local:MyPropertyGridDataTemplateSelector.FilePathDataTemplate
>
</
local:MyPropertyGridDataTemplateSelector
>