What’s the WPF way to mark a command as unavailable only if the parent of a tree item is the first in the list?

前端 未结 3 1553
粉色の甜心
粉色の甜心 2021-01-22 13:28

I have a tree view representing certain items. This tree is always two levels deep. The right-click menu for the child items has a \"move up\" command. The UI allows you to move

3条回答
  •  离开以前
    2021-01-22 13:44

    The "right" way would be to forget the UI manifestation of your problem and instead think about how your model should represent it. You do have a model behind your UI, right?

    Your UI would then just bind to the appropriate properties on your model.

提交回复
热议问题