Moving the app under wpf to avalonia ui. During the transfer, I encountered something that is not in the documentation. In General there is a piece of code from wpf:
public class BaseLabelElement : UIElement
{
public static readonly DependencyProperty FontFamilyProperty = DependencyProperty.Register(
"FontFamily", typeof(FontFamily), typeof(BaseLabelElement), new FrameworkPropertyMetadata(DefaultFontFamily,
FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, FontFamilyPropertyChanged));
public FontFamily FontFamily
{
get { return (FontFamily)GetValue(FontFamilyProperty); }
set { SetValue(FontFamilyProperty, value); }
}
}
How to add a new behavior corresponding to
new FrameworkPropertyMetadata (.., FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender,..)
for the dependency property in Avalonia?