Exemple #1
0
        static CTextBlock()
        {
            ClipToBoundsProperty.OverrideDefaultValue <CTextBlock>(true);

            AffectsRender <CTextBlock>(
                BackgroundProperty,
                TextBlock.ForegroundProperty,
                TextBlock.FontWeightProperty,
                TextBlock.FontSizeProperty,
                TextBlock.FontStyleProperty);

            Observable.Merge <AvaloniaPropertyChangedEventArgs>(
                ContentProperty.Changed,
                TextBlock.FontSizeProperty.Changed,
                TextBlock.FontStyleProperty.Changed,
                TextBlock.FontWeightProperty.Changed,
                TextWrappingProperty.Changed,
                BoundsProperty.Changed,
                TextVerticalAlignmentProperty.Changed,
                LineHeightProperty.Changed,
                LineSpacingProperty.Changed
                ).AddClassHandler <CTextBlock>((x, _) => x.OnMeasureSourceChanged());

            Observable.Merge <AvaloniaPropertyChangedEventArgs>(
                BaseHeightProperty.Changed
                ).AddClassHandler <CTextBlock>((x, _) => x.CheckHaveToMeasure());
        }
Exemple #2
0
        /// <summary>
        /// Initializes static members of the <see cref="TextBlock"/> class.
        /// </summary>
        static TextBlock()
        {
            ClipToBoundsProperty.OverrideDefaultValue <TextBlock>(true);

            AffectsRender <TextBlock>(
                BackgroundProperty, ForegroundProperty, FontSizeProperty,
                FontWeightProperty, FontStyleProperty, TextWrappingProperty,
                TextTrimmingProperty, TextAlignmentProperty, FontFamilyProperty,
                TextDecorationsProperty, TextProperty, PaddingProperty);

            AffectsMeasure <TextBlock>(
                FontSizeProperty, FontWeightProperty, FontStyleProperty,
                FontFamilyProperty, TextTrimmingProperty, TextProperty,
                PaddingProperty);

            Observable.Merge(
                TextProperty.Changed,
                ForegroundProperty.Changed,
                TextAlignmentProperty.Changed,
                TextWrappingProperty.Changed,
                TextTrimmingProperty.Changed,
                FontSizeProperty.Changed,
                FontStyleProperty.Changed,
                FontWeightProperty.Changed,
                FontFamilyProperty.Changed,
                TextDecorationsProperty.Changed,
                PaddingProperty.Changed
                ).AddClassHandler <TextBlock>((x, _) => x.InvalidateTextLayout());
        }
Exemple #3
0
 /// <summary>
 /// Initializes static members of the <see cref="TextBlock"/> class.
 /// </summary>
 static TextBlock()
 {
     ClipToBoundsProperty.OverrideDefaultValue <TextBlock>(true);
     AffectsRender(ForegroundProperty);
     AffectsRender(FontWeightProperty);
     AffectsRender(FontSizeProperty);
     AffectsRender(FontStyleProperty);
 }
Exemple #4
0
        static BlurryImage()
        {
            AffectsRender <BlurryImage>(BlurLevelProperty, SourceProperty, StretchDirectionProperty, StretchProperty);
            AffectsMeasure <BlurryImage>(BlurLevelProperty, SourceProperty, StretchDirectionProperty, StretchProperty);
            AffectsArrange <BlurryImage>(BlurLevelProperty, SourceProperty, StretchDirectionProperty, StretchProperty);

            ClipToBoundsProperty.OverrideDefaultValue <BlurryImage>(true);
        }
Exemple #5
0
        static LayoutTransformControl()
        {
            ClipToBoundsProperty.OverrideDefaultValue <LayoutTransformControl>(true);

            LayoutTransformProperty.Changed
            .AddClassHandler <LayoutTransformControl>(x => x.OnLayoutTransformChanged);

            ChildProperty.Changed
            .AddClassHandler <LayoutTransformControl>(x => x.OnChildChanged);
        }
        /// <summary>
        /// Initializes static members of the <see cref="Label"/> class.
        /// </summary>
        static Label()
        {
            ClipToBoundsProperty.OverrideDefaultValue <Label>(true);
            FocusableProperty.OverrideDefaultValue <Label>(false);

            AffectsRender <Label>(TextAlignmentProperty, TextDecorationsProperty);

            AffectsMeasure <Label>(TextWrappingProperty, TextTrimmingProperty, TextProperty, LineHeightProperty, MaxLinesProperty);

            Observable.Merge <AvaloniaPropertyChangedEventArgs>(TextProperty.Changed, ForegroundProperty.Changed,
                                                                TextAlignmentProperty.Changed, TextWrappingProperty.Changed,
                                                                TextTrimmingProperty.Changed, FontSizeProperty.Changed,
                                                                FontStyleProperty.Changed, FontWeightProperty.Changed,
                                                                FontFamilyProperty.Changed, TextDecorationsProperty.Changed,
                                                                PaddingProperty.Changed, MaxLinesProperty.Changed, LineHeightProperty.Changed
                                                                ).AddClassHandler <Label>((x, _) => x.InvalidateTextLayout());
        }
Exemple #7
0
        /// <summary>
        /// Initializes static members of the <see cref="TextBlock"/> class.
        /// </summary>
        static TextBlock()
        {
            ClipToBoundsProperty.OverrideDefaultValue <TextBlock>(true);
            AffectsRender <TextBlock>(
                BackgroundProperty,
                ForegroundProperty,
                FontWeightProperty,
                FontSizeProperty,
                FontStyleProperty);

            Observable.Merge(
                TextProperty.Changed,
                TextAlignmentProperty.Changed,
                FontSizeProperty.Changed,
                FontStyleProperty.Changed,
                FontWeightProperty.Changed
                ).AddClassHandler <TextBlock>((x, _) => x.OnTextPropertiesChanged());
        }
Exemple #8
0
        static RelativePanel()
        {
            ClipToBoundsProperty.OverrideDefaultValue <RelativePanel>(true);

            AboveProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignBottomWithPanelProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignBottomWithProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignHorizontalCenterWithPanelProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignHorizontalCenterWithProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignLeftWithPanelProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignLeftWithProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignRightWithPanelProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignRightWithProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignTopWithPanelProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignTopWithProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignVerticalCenterWithPanelProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            AlignVerticalCenterWithProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            BelowProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            LeftOfProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
            LeftOfProperty.Changed.AddClassHandler <Layoutable>(OnAlignPropertiesChanged);
        }
Exemple #9
0
 /// <summary>
 /// Initializes static members of the <see cref="Panel"/> class.
 /// </summary>
 static Panel()
 {
     AffectsRender <Panel>(BackgroundProperty);
     ClipToBoundsProperty.OverrideDefaultValue <Panel>(true);
 }
 static Viewbox()
 {
     ClipToBoundsProperty.OverrideDefaultValue <Viewbox>(true);
     UseLayoutRoundingProperty.OverrideDefaultValue <Viewbox>(true);
     AffectsMeasure <Viewbox>(StretchProperty, StretchDirectionProperty);
 }
Exemple #11
0
 /// <summary>
 /// Initializes static members of the <see cref="Panel"/> class.
 /// </summary>
 static Panel()
 {
     ClipToBoundsProperty.OverrideDefaultValue <Panel>(true);
 }
 static ItemsRepeater()
 {
     ClipToBoundsProperty.OverrideDefaultValue <ItemsRepeater>(true);
     RequestBringIntoViewEvent.AddClassHandler <ItemsRepeater>((x, e) => x.OnRequestBringIntoView(e));
 }
Exemple #13
0
 static Cell()
 {
     ClipToBoundsProperty.OverrideDefaultValue <Cell>(true);
 }
Exemple #14
0
 static ItemsRepeater()
 {
     ClipToBoundsProperty.OverrideDefaultValue <ItemsRepeater>(true);
 }
Exemple #15
0
 static ScrollContentPresenter()
 {
     ClipToBoundsProperty.OverrideDefaultValue(typeof(ScrollContentPresenter), true);
     Control.AffectsArrange(OffsetProperty);
 }
Exemple #16
0
 /// <summary>
 /// Initializes static members of the <see cref="ScrollContentPresenter"/> class.
 /// </summary>
 static ScrollContentPresenter()
 {
     ClipToBoundsProperty.OverrideDefaultValue(typeof(ScrollContentPresenter), true);
     ChildProperty.Changed.AddClassHandler <ScrollContentPresenter>((x, e) => x.ChildChanged(e));
 }
Exemple #17
0
        /// <summary>
        /// Initializes static members of the <see cref="TextBlock"/> class.
        /// </summary>
        static TextBlock()
        {
            ClipToBoundsProperty.OverrideDefaultValue <TextBlock>(true);

            AffectsRender <TextBlock>(BackgroundProperty, ForegroundProperty);
        }
Exemple #18
0
 static TrianglePicker()
 {
     AffectsMeasure <TrianglePicker>(ColorParentProperty);
     RadialColorSlider.RadiusProperty.Changed.AddClassHandler <TrianglePicker>((x, e) => x.InvalidateMeasure());
     ClipToBoundsProperty.OverrideDefaultValue <TrianglePicker>(false);
 }
Exemple #19
0
 /// <summary>
 /// Initializes static members of the <see cref="ScrollContentPresenter"/> class.
 /// </summary>
 static ScrollContentPresenter()
 {
     ClipToBoundsProperty.OverrideDefaultValue(typeof(ScrollContentPresenter), true);
     OffsetProperty.OverrideValidation <ScrollContentPresenter>(ValidateOffset);
     AffectsArrange(OffsetProperty);
 }
Exemple #20
0
 /// <summary>
 /// Initializes static members of the <see cref="TemplatedControl"/> class.
 /// </summary>
 static TemplatedControl()
 {
     ClipToBoundsProperty.OverrideDefaultValue <TemplatedControl>(true);
     TemplateProperty.Changed.AddClassHandler <TemplatedControl>((x, e) => x.OnTemplateChanged(e));
 }
Exemple #21
0
 /// <summary>
 /// Initializes static members of the <see cref = "TrackerControl" /> class.
 /// </summary>
 static TrackerControl()
 {
     ClipToBoundsProperty.OverrideDefaultValue <TrackerControl>(false);
     PositionProperty.Changed.AddClassHandler <TrackerControl>(PositionChanged);
 }
 /// <summary>
 /// Initializes static members of the <see cref="ScrollContentPresenter"/> class.
 /// </summary>
 static ScrollContentPresenter()
 {
     ClipToBoundsProperty.OverrideDefaultValue(typeof(ScrollContentPresenter), true);
     ChildProperty.Changed.AddClassHandler <ScrollContentPresenter>(x => x.ChildChanged);
     AffectsArrange(OffsetProperty);
 }
Exemple #23
0
 /// <summary>
 /// Initializes static members of the <see cref="Canvas"/> class.
 /// </summary>
 static Canvas()
 {
     ClipToBoundsProperty.OverrideDefaultValue <Canvas>(false);
     AffectsCanvasArrange(LeftProperty, TopProperty, RightProperty, BottomProperty);
 }