
Hi actiproteam,
I'm trying to implement an line spacing function (similar to word). It's a ComboBox with 4 Elements. Now I'd wrote an Command with your Commandparameter "DoubleValueCommandParameter". I looked at your samples (fontsizecombobox).
In the fontsizecombobox(which is a blackbox for me), there is no problem, the parameter gets filled and the value updated. But with my combobox with 4 elements, the parameter is null(but the updatevalue is inside).
CanExecutes:I suppose, you'd something in your fontsize(or fontfamily) combobox, I need also.
Thank for you Support,
Ynas
I'm trying to implement an line spacing function (similar to word). It's a ComboBox with 4 Elements. Now I'd wrote an Command with your Commandparameter "DoubleValueCommandParameter". I looked at your samples (fontsizecombobox).
In the fontsizecombobox(which is a blackbox for me), there is no problem, the parameter gets filled and the value updated. But with my combobox with 4 elements, the parameter is null(but the updatevalue is inside).
CanExecutes:
private void OnFontSizeCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
DoubleValueCommandParameter parameter = e.Parameter as DoubleValueCommandParameter;
if ((parameter != null) && (!this.IsPreviewModeActive))
{
parameter.UpdatedValue = this.SelectionFontSize;
parameter.Handled = true;
}
e.CanExecute = true;
}
private void OnLineSpacingCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
DoubleValueCommandParameter parameter = e.Parameter as DoubleValueCommandParameter ;
if (parameter != null)
{
parameter.UpdatedValue = this.SelectionLineSpacing;
parameter.Handled = true;
}
e.CanExecute = true;
}
Thank for you Support,
Ynas