Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Custom Binding in Subclassed DataGridTextColumn

$
0
0

hi

i did some research but don't see this exact issue anywhere

i sub-classed the DataGridTextColumn to provide for some custom functionality

now aside of the the standard "Binding" property, i would like to add another property to bind to, lets say a background color

so i added

Shared ReadOnly ColorProperty = DependencyProperty.Register("Color", GetType(String), GetType(DataGridRecordColumn))
    Property Color As String
        Get
            Return GetValue(ColorProperty)
        End Get
        Set(value As String)
            SetValue(ColorProperty, value)
        End Set
    End Property

but when i read this property in the code, its always nothing

i also tried adding a "binding" named color, but i dont see how to read/getvalue from the binding

id appreciate any help in the right direction!


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>