Skip to content

Difficulty when porting WPF control to Avalonia #5470

Answered by jp2masa
mcmikecreations asked this question in Q&A
Discussion options

You must be logged in to vote

ActualWidth corresponds to Bounds.Width.

  1. AddClassHandler (in the static constructor) is the best way, because it only subscribes once for all control instances.
  2. They're actually equivalent:
    add { AddHandler(ClickEvent, value); }
  3. I don't think that's validate, if I understand correctly the original is calling this constructor: FrameworkPropertyMetadata, so it would be equivalent to a property changed subscription like 1. (AddClassHandler or StringDataVisibilityProperty.Changed.Subscribe) .
  4. That would be something like #4447, if I understand correctly? If so, I think there's currently no way of doing that.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mcmikecreations
Comment options

Answer selected by mcmikecreations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants