wpf trouble using dependency properties in a UserControl

前端 未结 3 1678
萌比男神i
萌比男神i 2021-01-12 08:01

I made a UserControl that is meant to be updated once every few seconds with data from a serial port. This UserControl should be very simple, consisting of a Label for a fi

3条回答
  •  猫巷女王i
    2021-01-12 08:34

    Turns out that in the XAML for the user control, the binding was incorrectly specified.

    Originally it was:

    But I had not specified the element to which fieldValue belongs. It should be (assuming my user control is named "LF":

提交回复
热议问题