This question is locked. New answers and comments are not allowed.
Hello,
I created a custom GridViewDataColumn like this:
And in xaml:
Does anyone have any idea or solution?
I created a custom GridViewDataColumn like this:
public class EmpGridViewActionColumn : EMPGridViewDataColumn
{
public static readonly DependencyProperty ActionsProperty =
DependencyProperty.Register(
"Actions",
typeof(IList<ActionData>),
typeof(EMPGridView),
new PropertyMetadata(null, new PropertyChangedCallback(ActionsValueChange))
);
public IList<ActionData> Actions
{
get { return (IList<ActionData>)GetValue(ActionsProperty); }
set { SetValue(ActionsProperty, value); }
}
private static void ActionsValueChange(DependencyObject source, DependencyPropertyChangedEventArgs e)
{
if (e.NewValue != null)
{
((EmpGridViewActionColumn)source).Actions = (IList<ActionData>)e.NewValue;
((EmpGridViewActionColumn)source).ApplyEmpGridViewActionColumnTemplate();
}
}
}
And in xaml:
<myControls:EmpGridViewActionColumn Header="Type" Width="120">
<myControls:EmpGridViewActionColumn.Actions>
<myControls:EMPActionDataContract Name="Test"/>
</myControls:EmpGridViewActionColumn.Actions>
</myControls:EmpGridViewActionColumn>
At run time: I encounter error at line:
<myControls:EMPActionDataContract Name="Test"/>Does anyone have any idea or solution?