Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
925
Image size in XamComboEditor
posted

Hi all,
I would like a XamDataGrid's column to display images instead of values.

To obtain this result, I customized FieldSettings for that particular field, in this way: 

<Style x:Key="masterTypeEditorStyle" TargetType="{x:Type igEditors:XamComboEditor}">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="DropDownButtonDisplayMode" Value="OnlyInEditMode" />
<Setter Property="ToolTip" Value="{Binding Path=DataItem.masterType}" />
<Setter Property="ItemsProvider">
<Setter.Value>
<igEditors:ComboBoxItemsProvider>
<igEditors:ComboBoxItemsProvider.Items>
<igEditors:ComboBoxDataItem DisplayText="" Value="Master" Image="/assembly;component/path.to/master.png" />
<igEditors:ComboBoxDataItem DisplayText="" Value="Structure" Image="/assembly;component/path.to/structure.ico" />
<igEditors:ComboBoxDataItem DisplayText="" Value="Elementary" Image="/assembly;component/path.to/elementary.png" />
</igEditors:ComboBoxItemsProvider.Items>
</igEditors:ComboBoxItemsProvider>
</Setter.Value>
</Setter>
</Style>

<igDP:Field Name="masterType" Label="Type">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" EditorType="{x:Type igEditors:XamComboEditor}" EditorStyle="{StaticResource masterTypeEditorStyle}" />
</igDP:Field.Settings>
</igDP:Field>

Images are correctly displayed, depending on the current value of View Model's "masterType" property. But they are smaller than their original size (16x16) and they look a little bit blurry.

Is there any way to control image size and rendering options on combo editor? 

Thank you, bye. Maria

Parents Reply Children
No Data