TextBlock valueBlock = new TextBlock() { TextWrapping = TextWrapping.NoWrap }; Binding valueBinding = new Binding() { Path = new PropertyPath(string.Format("[{0}]", field)), StringFormat= aliases[field] + ": {0}" }; valueBlock.SetBinding(TextBlock.TextProperty, valueBinding);
Binding colorBinding = new Binding{ Path = new PropertyPath(string.Format("[{0}]", field)), Converter = new MyColorConverter() }; valueBlock.SetBinding(TextBlock.ForegroundProperty, colorBinding );
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.