Skip to content

How to Localize Enums? #375

Answered by Karnah
itarci asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, @itarci.
I don't have much experience in working with DataGrid and ObjectDataProvider. But I found a solution with overloading default styles. Does it suit you?

<DataGridComboBoxColumn	Header="{lex:Loc DiagonalLift}" Width="Auto"
                        SelectedItemBinding="{Binding diverse, Converter={StaticResource EnumConverter}, ConverterParameter={x:Type local:enum_DiagonalLift}}}">
    <DataGridComboBoxColumn.ElementStyle>
        <Style TargetType="ComboBox">
            <Setter Property="ItemsSource" Value="{Binding Source={StaticResource myEnum_DiagonalLift}, Mode=OneWay}" />
            <Setter Property="ItemTemplate">
                <Setter.Value>
                    <D…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by konne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants