cs snippets: small updates to Slider and Box

This commit is contained in:
Xavi Artigas 2019-10-02 16:27:28 +02:00
parent 9f0eebb54f
commit 6dfa4bac1d
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,7 @@
Efl.Ui.Box box = new Efl.Ui.Box(parent);
//Creating content which we will pack into the box - it can be any widgets, for example buttons.
//Creating content which we will pack into the box
//It can be any widget, for example, buttons
Efl.Ui.Button button1 = new Efl.Ui.Button(box);
Efl.Ui.Button button2 = new Efl.Ui.Button(box);

View File

@ -3,7 +3,14 @@ Efl.Ui.Slider slider = new Efl.Ui.Slider(parent);
slider.SetRangeLimits(0, 100);
slider.SetRangeValue(50);
// You get this event every time the slider moves
slider.ChangedEvent += (sender, args) =>
{
Console.WriteLine("Current slider value is: " + slider.GetRangeValue());
};
// You only get this event once the slider is stable
slider.SteadyEvent += (sender, args) =>
{
Console.WriteLine("STEADY slider value is: " + slider.GetRangeValue());
};