I have the following Xaml that is used in a user control that is used as an editor inside a property grid. The question is, what would C # look like to attach behavior from code?
<i:Interaction.Behaviors>
<igExt:XamComboEditorSelectedItemsBehavior SelectedItems="{Binding SelectedItems, ElementName=_uc}"/>
</i:Interaction.Behaviors>
Since this is in an editor that dynamically loads into the PropertyGrid, I'm just going to create an editor instance with code binding, and not have different xaml files that are really short and contain only one editor.
Or would it be easier to just repeat all the code that is in the Behavior and invoke it while I create the editor in the code?
source
share