[NUI] Add ControlStateTypeConverter for xaml (#2002)
* [NUI] rename from StateValuePair to SelectorItem
* [NUI] add ControlStateTypeConverter for xaml
Custom ConstrolState is now available in xaml.
### Sample
XamlPage.xaml
```xaml
<View x:Class="NUIXamlTemplate1.XamlPage"
xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:c="clr-namespace:Tizen.NUI.Components;assembly=Tizen.NUI.Components"
xmlns:local="clr-namespace:NUIXamlTemplate1">
<local:MyButton x:Name="MyButton">
<x:Arguments>
<c:ButtonStyle Size="100, 100">
<c:ButtonStyle.BackgroundColor>
<Selector x:TypeArguments="Color" Normal="1, 1, 0, 1" Pressed="0.77, 0.88, 1, 1" Disabled="0.88, 0.88, 0.88, 1">
<SelectorItem x:TypeArguments="Color" State="MyState" Value="0,0,1,1" />
<SelectorItem x:TypeArguments="Color" State="MyState,Focused" Value="0,1,1,1" />
</Selector>
</c:ButtonStyle.BackgroundColor>
</c:ButtonStyle>
</x:Arguments>
</local:MyButton>
</View>
```
MyButton.cs
```cs
public class MyButton : Button
{
public MyButton(ButtonStyle buttonStyle) : base(buttonStyle) {}
public void SetControlState(ControlState s) => ControlState = s;
}
```
```cs
protected override void OnCreate()
{
base.OnCreate();
Window.Instance.BackgroundColor = new Color(227 / 255f, 255 / 255f, 227 / 255f, 1.0f);
Window.Instance.KeyEvent += OnKeyEvent;
View root = new View();
root.WidthSpecification = LayoutParamPolicies.MatchParent;
root.HeightSpecification = LayoutParamPolicies.MatchParent;
root.Layout = new AbsoluteLayout();
Window.Instance.GetDefaultLayer().Add(root);
XamlPage xamlPage = new XamlPage();
root.Add(xamlPage);
ControlState MyState = ControlState.Create("MyState");
Button button = new Button() { Position2D = new Position2D(100, 100) };
bool flag = false;
button.Clicked += (object sender, ClickedEventArgs e) =>
{
if (!flag)
{
xamlPage.MyButton.SetControlState(MyState);
flag = true;
}
else
{
xamlPage.MyButton.SetControlState(ControlState.Focused + MyState);
flag = false;
}
};
root.Add(button);
}
```
Co-authored-by: dongsug-song <35130733+dongsug-song@users.noreply.github.com>