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
375
How to bind to the Enumeration of a xamTextEditor ValueConstrainst
posted

I am simply trying to bind to a variable that is a list of strings in the code behind and it is not working. Can you bind to the Enumeration property of a ValueConstrainst in a xamTextEditor?

 

 

 

 

 

<Style x:Key="PCLFieldStyle" TargetType="{x:Type igEditors:XamTextEditor}">

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<Setter Property="ValueConstraint">

<Setter.Value>

 

 

 

 

 

<igEditors:ValueConstraint Enumeration="{Binding Path=PCLList}"/>

 

 

 

 

 

</Setter.Value>

 

 

 

 

 

</Setter>

 

</

 

 

Style>

 

...

 

 

<

 

 

igDP:Field Name="PCL" >

 

 

 

 

 

<igDP:Field.Settings>

 

 

 

 

 

<igDP:FieldSettings EditorStyle="{StaticResource PCLFieldStyle}" />

 

 

 

 

 

 

 

</igDP:Field.Settings>

 

 

 

 

</igDP:Field>

code behind:

public

 

 

List<string> PCLList;

public

 

 

void Initialize()

{

PCLList =

 

new List<string>(GetPCLListMethod());

}

 

 

 

 

 

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello,

    Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I create a class in which I put the list with the strings and make the Binding’s Source property to an instance of that class. Please let me know if this helps you or you need further assistance on this matter.

    Looking forward for your reply.

    XamTextEditorEnumeration.zip
Children