Ich habe eine Kontrolle Gewohnheit in WPF und ich brauche eine comboBox darauf eine Enumeration zu binden, ich schrieb,bindet Enum Combobox auf EIGENE KONTROLL
auf der Web-Suche fand ich, dass dies der Weg zu gehen:
<ObjectDataProvider
MethodName="GetDict"
ObjectType="{x:Type App:EnumDescriptionValueDict}"
x:Key="EnumDescriptionDict">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="App:Transmission"></x:Type>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<ComboBox
ItemsSource="{Binding Source={StaticResource EnumDescriptionDict}}"
DisplayMemberPath="Key"
SelectedValuePath="Value"/>
aber meine Kontrolle XAML
<UserControl x:Class="WpfControlFoo.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" Width="799" Height="107">
so finde ich keinen Ort, um die Object XAML
0 einfügenVielen Dank für die Vorschläge :)
Mit dem Bereich es in definieren –