Dali C# binding : Creating Color Constructor to accept enum Colors 35/95235/2
authorEmil Abraham <emil.abraham@samsung.com>
Wed, 2 Nov 2016 13:10:29 +0000 (18:40 +0530)
committerEmil Abraham <emil.abraham@samsung.com>
Wed, 2 Nov 2016 13:40:15 +0000 (19:10 +0530)
commit9485bf59c285547e4d5ba97b0270f914a2b2cf63
tree6b050bf0954961e6f42e8a375d6834f3186d5831
parent07b1b771c6a3affaf013f93c1306723eae0621e4
Dali C# binding : Creating Color Constructor to accept enum Colors

The Color class takes a string in the constructor, so it cannot check
whether the string represents a valid color. Here we define constants for
these colors as enum, so that it can do this check during compilation.

Now we can use stage.BackgroundColor =  new Color(Colors.White); instead of
stage.BackgroundColor =  new Color("white");

Change-Id: I135e4103d6f9171011ed9d4e60f486a3e237d6cd
Signed-off-by: Emil Abraham <emil.abraham@samsung.com>
plugins/dali-swig/examples/dali-test.cs
plugins/dali-swig/manual/csharp/Color.cs