void ComboBoxItemsEditableB181973() { FrameworkElement control = ((DemoModule)DemoBaseTesting.CurrentDemoModule).DemoModuleControl.OptionsContent; if (control == null) { return; } List <ComboBoxEdit> editors = FindAllElements <ComboBoxEdit>(control); for (int i = 0; i < editors.Count; i++) { AssertLog.IsFalse((bool)editors[i].IsTextEditable, "ComboBoxEdit items editable: " + DemoBaseTesting.CurrentDemoModule.GetType().Name + " " + editors[i].Name); AssertLog.IsFalse(editors[i].SelectedIndex < 0, "ComboBoxEdit item is not selected: " + DemoBaseTesting.CurrentDemoModule.GetType().Name + " " + editors[i].Name); } }
void TextBlockTextTrimmingB185312() { FrameworkElement control = ((DemoModule)DemoBaseTesting.CurrentDemoModule).DemoModuleControl.OptionsContent; if (control == null) { return; } List <TextBlock> editors = FindAllElements <TextBlock>(control); foreach (TextBlock edit in editors) { bool trimmed = TextBlockService.CalcIsTextTrimmed(edit) && edit.DesiredSize.Width > (edit.ActualWidth + edit.Margin.Left + edit.Margin.Right); AssertLog.IsFalse(trimmed, "Text is trimmed: " + DemoBaseTesting.CurrentDemoModule.GetType().Name + " text=" + edit.Text + ", Name=" + edit.Name + ", actual " + edit.ActualWidth + "px, desired:" + edit.DesiredSize.Width + "px"); } }
void AssertTextEditsWidthB185051() { FrameworkElement control = ((DemoModule)DemoBaseTesting.CurrentDemoModule).DemoModuleControl.OptionsContent; if (control == null) { return; } List <TextEdit> editors = FindAllElements <TextEdit>(control); foreach (TextEdit edit in editors) { if (edit.EditMode == EditMode.InplaceInactive || edit.IsPrintingMode == true) { continue; } AssertLog.IsFalse(edit.Width == Double.PositiveInfinity, "TextEdit unlimited width: " + DemoBaseTesting.CurrentDemoModule.GetType().Name + " text=" + edit.Text + ", Name=" + edit.Name + " desired " + edit.ActualWidth + "px"); } }