I need to have a customized editor definition of a property in the Property Grid.
The property definition contains a combo box and a button. Combo box items have to be populated as a list of image files present in a specified folder within the project. The button is used to open a file browser and browse for image files and copy the selected files in the same folder alongwith adding it to the combo box content.
I have written the property definition data template as below. But neither i am unable to bind the list to the combo box from xaml code nor i am getting the instance of the combo box in C# code end so that i can bind it there.
<xctk:EditorDefinition >
Thanks in advance
The property definition contains a combo box and a button. Combo box items have to be populated as a list of image files present in a specified folder within the project. The button is used to open a file browser and browse for image files and copy the selected files in the same folder alongwith adding it to the combo box content.
I have written the property definition data template as below. But neither i am unable to bind the list to the combo box from xaml code nor i am getting the instance of the combo box in C# code end so that i can bind it there.
<xctk:EditorDefinition >
<xctk:EditorDefinition.PropertiesDefinitions>
<xctk:PropertyDefinition Name="Image" />
</xctk:EditorDefinition.PropertiesDefinitions>
<xctk:EditorDefinition.EditorTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ComboBox Grid.Column="0" x:Name="ImageCombo" SelectionChanged="Image_OnSelectionChanged" ItemsSource="{Binding CustomKeyImageList}" Initialized="ImageCombo_OnInitialized">
</ComboBox>
<Button Grid.Column="1" Content="..." Click="OnAddCustomKeyImagesButtonClick"></Button>
</Grid>
</DataTemplate>
</xctk:EditorDefinition.EditorTemplate>
</xctk:EditorDefinition>
Please come up with a solution.Thanks in advance