[NUI][NUI.Devel] Update nui line coverage TCs.
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Tests / Tizen.NUI.Devel.Tests / res / layout / BindingSample.xaml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <View x:Class="Tizen.NUI.Devel.Tests.BindingSample"
3   xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
4   xmlns:l="clr-namespace:Tizen.NUI.Devel.Tests;assembly=Tizen.NUI.Devel.Tests"
5   xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
6
7     <View.XamlResources>
8         <ResourceDictionary>
9             <l:FloatToBoolConverter x:Key="floatToBool" />
10             <l:FloatToIntConverter x:Key="floatToInt" />
11         </ResourceDictionary>
12     </View.XamlResources>
13
14     <View x:Name="view1" BackgroundColor="Red" SizeWidth="100" SizeHeight="100" Sensitive="true" />
15     <TextLabel PositionX="200" PositionY="500" Ellipsis="{Binding Source={x:Reference view1}, Path=SizeWidth, Converter={StaticResource floatToBool}}" />
16     <TextLabel>
17         <TextLabel.Text>
18             <Binding Source="{x:Reference view1}" Path="Sensitive">
19                 <Binding.Converter>
20                     <l:BoolToObjectConverter x:TypeArguments="x:String" TrueObject="Of course!" FalseObject="No way!" />
21                 </Binding.Converter>
22             </Binding>
23         </TextLabel.Text>
24     </TextLabel>
25     <TextLabel Text="{Binding Red, Converter={StaticResource floatToInt}, ConverterParameter=255, StringFormat='Red = {0:X2}'}" >
26         <TextLabel.BindingContext>
27             <l:RgbColorViewModel Color="Red" />
28         </TextLabel.BindingContext>
29     </TextLabel>
30
31     <TextLabel PointSize="18">
32         <TextLabel.XamlStyle>
33             <Binding Source="{x:Reference view1}" Path="Sensitive">
34                 <Binding.Converter>
35                     <l:BoolToObjectConverter x:TypeArguments="XamlStyle">
36                         <l:BoolToObjectConverter.TrueObject>
37                             <XamlStyle TargetType="TextLabel">
38                                 <!--<Setter Property="Text" Value="Indubitably!" />
39                                 <Setter Property="TextColor" Value="Green" />-->
40                             </XamlStyle>
41                         </l:BoolToObjectConverter.TrueObject>
42
43                         <l:BoolToObjectConverter.FalseObject>
44                             <XamlStyle TargetType="TextLabel">
45                                 <!--<Setter Property="Text" Value="Maybe later" />
46                                 <Setter Property="TextColor" Value="Red" />-->
47                             </XamlStyle>
48                         </l:BoolToObjectConverter.FalseObject>
49                     </l:BoolToObjectConverter>
50                 </Binding.Converter>
51             </Binding>
52         </TextLabel.XamlStyle>
53     </TextLabel>
54 </View>