public static void mvvm_dynamic_parts() { var parent = new Efl.Ui.Win(null); parent.Visible = false; var factory = new Efl.Ui.ItemFactory <Efl.Ui.ListDefaultItem>(parent); var bindablePart = factory.TextPart(); var error = bindablePart.Markup().Bind("name"); Test.AssertEquals(error, Eina.Error.NO_ERROR); factory.Dispose(); parent.Dispose(); }
public static void mvvm_factory_properties() { var parent = new Efl.Ui.Win(null); parent.Visible = false; var factory = new Efl.Ui.ItemFactory <Efl.Ui.ListDefaultItem>(parent); var iconFactory = new Efl.Ui.ImageFactory(null); iconFactory.BindProperty("filename", "modelProperty"); var error = factory.IconPart().BindFactory(iconFactory); Test.AssertEquals(error, Eina.Error.NO_ERROR); iconFactory.Dispose(); factory.Dispose(); parent.Dispose(); }
public static void factory_test() { string propertyBound = null; bool callbackCalled = false; var parent = new Efl.Ui.Win(null); parent.Visible = false; var factory = new Efl.Ui.ItemFactory <Efl.Ui.Button>(parent); factory.PropertyBoundEvent += (object sender, Efl.Ui.PropertyBindPropertyBoundEventArgs args) => { propertyBound = args.arg; callbackCalled = true; }; factory.Style().Bind("first name"); Test.Assert(callbackCalled, "Property bound callback must have been called."); Test.AssertEquals(propertyBound, "style"); factory.Dispose(); parent.Dispose(); }