public void Execute() { while ((bool)Condition.Value) { InnerBlock?.Execute(); } NextBlock?.Execute(); }
public AutoFitTextBlock() { this.InitializeComponent(); this.RegisterPropertyChangedCallback(FontFamilyProperty, (s, e) => RecalculateSize()); this.RegisterPropertyChangedCallback(FontWeightProperty, (s, e) => RecalculateSize()); this.RegisterPropertyChangedCallback(FontStyleProperty, (s, e) => RecalculateSize()); InnerBlock.SetBinding(TextBlock.TextProperty, new Binding() { Source = this, Path = new PropertyPath("Text") }); }
public void Execute() { var condition = (bool)Condition.Value; if (condition) { InnerBlock?.Execute(); var next = NextBlock ?? null; while (next is ElseBlock || next is ElseIfBlock) { next = next?.NextBlock; } next?.Execute(); } else { NextBlock?.Execute(); } }
public override void AssertMainThreadBlockReleaseCallback(InnerBlock completionHandler) { completionHandler(42); }