Skip to content

Commit d1cfd9f

Browse files
committedNov 25, 2016
Change Property->ReadProperty in samples
1 parent 5d96916 commit d1cfd9f

File tree

19 files changed

+48
-48
lines changed

19 files changed

+48
-48
lines changed
 

‎Samples/Animation/AttractorMotion/Pointly.ux

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<Panel ux:InnerClass="MoveIt" Color="#AAF" Padding="2" Alignment="Center">
88
<string ux:Property="Text"/>
99
<Size ux:Property="Value"/>
10-
<Text FontSize="20" Value="{Property this.Text}"/>
10+
<Text FontSize="20" Value="{ReadProperty this.Text}"/>
1111
<Clicked>
12-
<Set Target="A1.Value" Value="{Property this.Value}"/>
12+
<Set Target="A1.Value" Value="{ReadProperty this.Value}"/>
1313
</Clicked>
1414
</Panel>
1515
<MoveIt Text="&lt;" Value="0"/>

‎Samples/Animation/AttractorMotion/Rotater.ux

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,23 @@
1919

2020
<Circle LengthAngleDegrees="15" ux:Name="TheCircle">
2121
<Stroke Width="20" Alignment="Inside" Color="#080"/>
22-
<Attractor Target="TheCircle.StartAngleDegrees" Value="{Property TheBehavior.DegreesValue}"
22+
<Attractor Target="TheCircle.StartAngleDegrees" Value="{ReadProperty TheBehavior.DegreesValue}"
2323
Unit="Degrees" Type="SmoothSnap"/>
2424
</Circle>
2525

2626
<Circle LengthAngleDegrees="15" ux:Name="TheCircle2">
2727
<Stroke Width="20" Alignment="Inside" Color="#008" Offset="-20"/>
28-
<Attractor Target="TheCircle2.StartAngleDegrees" Value="{Property TheBehavior.DegreesValue}"
28+
<Attractor Target="TheCircle2.StartAngleDegrees" Value="{ReadProperty TheBehavior.DegreesValue}"
2929
Unit="Degrees" Type="Elastic"/>
3030
</Circle>
3131

3232
<Circle LengthAngleDegrees="15" ux:Name="TheCircle3">
3333
<Stroke Width="20" Alignment="Inside" Color="#800" Offset="-40"/>
34-
<Attractor Target="TheCircle3.StartAngleDegrees" Value="{Property TheBehavior.DegreesValue}"
34+
<Attractor Target="TheCircle3.StartAngleDegrees" Value="{ReadProperty TheBehavior.DegreesValue}"
3535
Unit="Degrees" Easing="BounceOut" Duration="1" Distance="90"/>
3636
</Circle>
3737

38-
<Circle Color="#EEE" LengthAngleDegrees="15" StartAngleDegrees="{Property TheBehavior.DegreesValue}"/>
38+
<Circle Color="#EEE" LengthAngleDegrees="15" StartAngleDegrees="{ReadProperty TheBehavior.DegreesValue}"/>
3939
<Circle Color="#DDD"/>
4040

4141
</RangeControl>

‎Samples/Animation/CyclePhase/MainView.ux

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<float ux:Property="TimeOffset"/>
55
<Translation RelativeTo="ParentSize" ux:Name="TheTrans"/>
66
<WhileVisible>
7-
<Cycle Target="TheTrans.X" Low="0" High="1" ProgressOffset="{Property self.TimeOffset}"
7+
<Cycle Target="TheTrans.X" Low="0" High="1" ProgressOffset="{ReadProperty self.TimeOffset}"
88
Frequency="0.2" Waveform="Sawtooth" Easing="CircularOut"/>
99
<Cycle Target="self.Opacity" Low="0" High="1" Waveform="Sawtooth" Frequency="0.2"
10-
ProgressOffset="{Property self.TimeOffset}" Easing="QuinticOut"/>
10+
ProgressOffset="{ReadProperty self.TimeOffset}" Easing="QuinticOut"/>
1111
</WhileVisible>
1212
</Circle>
1313

‎Samples/Animation/ExpandingToolbar/MainView.ux

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Rectangle ux:Class="Icon" IconColor="#fff">
66
<FileSource ux:Property="IconFile"/>
77
<float4 ux:Property="IconColor"/>
8-
<Image File="{Property this.IconFile}" Color="{Property this.IconColor}" Width="50%"/>
8+
<Image File="{ReadProperty this.IconFile}" Color="{ReadProperty this.IconColor}" Width="50%"/>
99
</Rectangle>
1010
<Panel Height="60" Aspect="5" BoxSizing="FillAspect">
1111
<Grid ColumnCount="5">

‎Samples/Animation/TimelineWrap/MainView.ux

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<double ux:Property="TimeOffset"/>
55
<SolidColor Color="0.8,0.96,0.99,1" ux:Name="TheColor"/>
66

7-
<Timeline PlayMode="Wrap" InitialProgress="{Property self.TimeOffset}"
7+
<Timeline PlayMode="Wrap" InitialProgress="{ReadProperty self.TimeOffset}"
88
TimeMultiplier="0.9">
99
<Move KeyframeInterpolation="CatmullRom" RelativeTo="ParentSize">
1010
<Keyframe X="0" Time="0"/>
@@ -26,7 +26,7 @@
2626
<Keyframe Value="1" Time="2"/>
2727
</Scale>
2828
</Timeline>
29-
<Timeline PlayMode="Wrap" InitialProgress="{Property self.TimeOffset}">
29+
<Timeline PlayMode="Wrap" InitialProgress="{ReadProperty self.TimeOffset}">
3030
<Move KeyframeInterpolation="Linear" RelativeTo="ParentSize">
3131
<Keyframe Y="0" Time="0"/>
3232
<Keyframe Y="1" Time="4"/>

‎Samples/Camera/MainView.ux

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<JavaScript File="main.js"/>
33
<Panel ux:Class="FatButton" Background="#FFFFFF" Margin="0,5,0,5" Text="">
44
<string ux:Property="Text" />
5-
<Button Text="{Property this.Text}" Padding="5,5,5,5" />
5+
<Button Text="{ReadProperty this.Text}" Padding="5,5,5,5" />
66
</Panel>
77
<ClientPanel>
88
<WhileEmpty Items="{imagePath}">

‎Samples/Controls/ButtonWithImage/MainView.ux

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
<DockPanel ux:Class="MyButtonFile" Padding="10">
66
<Uno.UX.FileSource ux:Property="FileImage"/>
77
<string ux:Property="Text"/>
8-
<Image File="{Property this.FileImage}" Dock="Left" Color="0,0.2,0.2,1"/>
9-
<Text Alignment="Center" Value="{Property this.Text}"/>
8+
<Image File="{ReadProperty this.FileImage}" Dock="Left" Color="0,0.2,0.2,1"/>
9+
<Text Alignment="Center" Value="{ReadProperty this.Text}"/>
1010
<Rectangle Layer="Background" Color="0.9,1,1,1"/>
1111
</DockPanel>
1212

1313
<!-- Provides an `Image` property that is bound to an ImageSource -->
1414
<DockPanel ux:Class="MyButtonSource" Padding="10">
1515
<ImageSource ux:Property="Image"/>
1616
<string ux:Property="Text"/>
17-
<Image Source="{Property this.Image}" Dock="Left" Color="0,0.2,0.2,1"/>
18-
<Text Alignment="Center" Value="{Property this.Text}"/>
17+
<Image Source="{ReadProperty this.Image}" Dock="Left" Color="0,0.2,0.2,1"/>
18+
<Text Alignment="Center" Value="{ReadProperty this.Text}"/>
1919
<Rectangle Layer="Background" Color="0.9,1,1,1"/>
2020
</DockPanel>
2121

‎Samples/Controls/Circular/MainView.ux

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Panel ux:Class="ClockTick" ux:Name="self">
33
<string ux:Property="Text"/>
44
<float ux:Property="ClockValue"/>
5-
<Text Alignment="Center" Value="{Property self.Text}" FontSize="24" Color="0,0,0,1"/>
5+
<Text Alignment="Center" Value="{ReadProperty self.Text}" FontSize="24" Color="0,0,0,1"/>
66
</Panel>
77

88
<Panel ux:Class="ClockHand" Anchor="0%,50%" X="50%" Y="50%" Width="29.5%" Height="10%"
@@ -88,12 +88,12 @@
8888

8989
<ClockHand ux:Name="TheHourLine">
9090
<Rotation ux:Name="HourRotate"/>
91-
<Attractor Target="HourRotate.Degrees" Value="{Property HourSlide.DegreesValue}"
91+
<Attractor Target="HourRotate.Degrees" Value="{ReadProperty HourSlide.DegreesValue}"
9292
Type="SmoothSnap" Unit="Degrees"/>
9393

9494
<Attractor Target="TheHourLine.Width" ux:Name="HourLineAttractor"
9595
Type="SmoothSnap" Unit="Points"/>
96-
<RangeAnimation Value="{Property HourSelect.ValueY}" Minimum="0" Maximum="1">
96+
<RangeAnimation Value="{ReadProperty HourSelect.ValueY}" Minimum="0" Maximum="1">
9797
<Change HourLineAttractor.Value="41.5"/>
9898
</RangeAnimation>
9999
</ClockHand>
@@ -143,7 +143,7 @@
143143

144144
<ClockHand Width="41.5%">
145145
<Rotation ux:Name="MinuteRotate"/>
146-
<Attractor Target="MinuteRotate.Degrees" Value="{Property MinuteSlide.DegreesValue}"
146+
<Attractor Target="MinuteRotate.Degrees" Value="{ReadProperty MinuteSlide.DegreesValue}"
147147
Type="SmoothSnap" Unit="Degrees"/>
148148
</ClockHand>
149149

‎Samples/Controls/Selection/MainView.ux

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Stroke Width="2" Color="#222"/>
88
</Rectangle>
99
<Rectangle Layer="Background" CornerRadius="5" Color="#0008" Offset="5,5"/>
10-
<Label Value="{Property this.Text}"/>
10+
<Label Value="{ReadProperty this.Text}"/>
1111
<Image Alignment="VerticalCenter" Dock="Right" File="Assets/arrowright.png" Color="#510"/>
1212
</DockPanel>
1313

‎Samples/Controls/Selection/PaymentPage.ux

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
<Rectangle Layer="Background" Color="#DDD">
2525
<Stroke Width="1" Color="#000"/>
2626
</Rectangle>
27-
<Selection Value="{Property this.Value}" MinCount="1" MaxCount="1"/>
28-
<Each Items="{Property this.Items}">
27+
<Selection Value="{ReadProperty this.Value}" MinCount="1" MaxCount="1"/>
28+
<Each Items="{ReadProperty this.Items}">
2929
<Panel Color="#0000" ux:Name="ThePanel">
3030
<Selectable Value="{value}"/>
3131
<Label Value="{label}"/>

‎Samples/Controls/Selection/PizzaPage.ux

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<string ux:Property="Title"/>
55
<string ux:Property="Ingredients"/>
66

7-
<Selectable Value="{Property this.Title}"/>
7+
<Selectable Value="{ReadProperty this.Title}"/>
88
<Rectangle Layer="Background" CornerRadius="5" Color="#FFF" ux:Name="TheBack">
99
</Rectangle>
1010

1111
<Image Dock="Right" File="Assets/checkmark.png" Color="#060" ux:Name="TheCheck"
1212
Visibility="Hidden" Width="20"/>
13-
<Text FontSize="30" Dock="Top" Value="{Property this.Title}"/>
14-
<Text FontSize="12" Value="{Property this.Ingredients}"/>
13+
<Text FontSize="30" Dock="Top" Value="{ReadProperty this.Title}"/>
14+
<Text FontSize="12" Value="{ReadProperty this.Ingredients}"/>
1515

1616

1717
<WhileSelected>
@@ -42,7 +42,7 @@
4242
</StackPanel>
4343
</ScrollView>
4444

45-
<WhileString Value="{Property PizzaSel.Value}" Test="IsNotEmpty">
45+
<WhileString Value="{ReadProperty PizzaSel.Value}" Test="IsNotEmpty">
4646
<Change TheNext.Visibility="Visible"/>
4747
</WhileString>
4848
<PizzaButton Dock="Bottom" Alignment="BottomRight" Text="Choose Toppings"

‎Samples/Controls/Selection/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ This example demonstrates the various aspects of the selection API by means of a
1212

1313
A `PizzaType` class is created to make it easier to create all the items in the selection. The `Selectable` behavior is what makes the item selectable:
1414

15-
<Selectable Value="{Property this.Title}"/>
15+
<Selectable Value="{ReadProperty this.Title}"/>
1616

1717
`Selection` and `Selectable` are the two key types that work together in creating a selection control.
1818

1919
The button to go to the next page doesn't appear until an item is selected. This simple behavior is done by using the `Selection.Value` in a `WhileString` trigger.
2020

21-
<WhileString Value="{Property PizzaSel.Value}" Test="IsNotEmpty">
21+
<WhileString Value="{ReadProperty PizzaSel.Value}" Test="IsNotEmpty">
2222

2323

2424
## Multiple Selection

‎Samples/Controls/Selection/ToppingsPage.ux

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
<string ux:Property="Value"/>
2323
<Uno.UX.FileSource ux:Property="File"/>
2424

25-
<Selectable Value="{Property this.Value}"/>
25+
<Selectable Value="{ReadProperty this.Value}"/>
2626

2727
<Rectangle CornerRadius="5" Layer="Background" Color="#FFF" ux:Name="TheBack"/>
28-
<Image File="{Property this.File}" Margin="10" ux:Name="TheImage"/>
28+
<Image File="{ReadProperty this.File}" Margin="10" ux:Name="TheImage"/>
2929

3030
<WhileSelected>
3131
<Change TheBack.Color="#CAF" Duration="0.2"/>

‎Samples/DropdownMenu/DropdownMenu.ux

+10-10
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
<Brush ux:Property="BorderColor" />
3535
<float ux:Property="FontSize" />
3636
<float4 ux:Property="TextColor" />
37-
<Rectangle Layer="Background" ux:Name="bgCol" Fill="{Property self.BackgroundColor}">
38-
<Stroke Brush="{Property self.BorderColor}" Width="1" />
37+
<Rectangle Layer="Background" ux:Name="bgCol" Fill="{ReadProperty self.BackgroundColor}">
38+
<Stroke Brush="{ReadProperty self.BorderColor}" Width="1" />
3939
</Rectangle>
40-
<Text Margin="10,0,0,0" Alignment="CenterLeft" Value="{Property self.Text}" FontSize="{Property self.FontSize}" Color="{Property self.TextColor}" />
40+
<Text Margin="10,0,0,0" Alignment="CenterLeft" Value="{ReadProperty self.Text}" FontSize="{ReadProperty self.FontSize}" Color="{ReadProperty self.TextColor}" />
4141

4242
</Panel>
4343

@@ -49,10 +49,10 @@
4949
<Brush ux:Property="BorderColor" />
5050
<float ux:Property="FontSize" />
5151
<float4 ux:Property="TextColor" />
52-
<Text Margin="10,0,0,0" FontSize="{Property self.FontSize}" Color="{Property self.TextColor}" Alignment="CenterLeft" Value="{Property self.Text}" />
52+
<Text Margin="10,0,0,0" FontSize="{ReadProperty self.FontSize}" Color="{ReadProperty self.TextColor}" Alignment="CenterLeft" Value="{ReadProperty self.Text}" />
5353
<Panel Layer="Background">
54-
<Rectangle Layer="Background" Fill="{Property self.BackgroundColor}" Height="100%" Alignment="Top">
55-
<!--Stroke Brush="{Property self.BorderColor}" Width="1" /-->
54+
<Rectangle Layer="Background" Fill="{ReadProperty self.BackgroundColor}" Height="100%" Alignment="Top">
55+
<!--Stroke Brush="{ReadProperty self.BorderColor}" Width="1" /-->
5656
</Rectangle>
5757
</Panel>
5858
</Panel>
@@ -63,17 +63,17 @@
6363
<Panel Width="200" Height="40">
6464
<DataBinding Target="menu.Selected" Key="selected" />
6565
<Rectangle>
66-
<Stroke Brush="{Property menu.BorderColor}" Width="1" />
66+
<Stroke Brush="{ReadProperty menu.BorderColor}" Width="1" />
6767
</Rectangle>
68-
<DropdownSelectedItem TextColor="{Property menu.TextColor}" FontSize="{Property menu.FontSize}" Text="{selected}" BackgroundColor="{Property menu.BackgroundColor}" BorderColor="{Property menu.BorderColor}" />
68+
<DropdownSelectedItem TextColor="{ReadProperty menu.TextColor}" FontSize="{ReadProperty menu.FontSize}" Text="{selected}" BackgroundColor="{ReadProperty menu.BackgroundColor}" BorderColor="{ReadProperty menu.BorderColor}" />
6969
<Clicked>
7070
<Toggle Target="expandDropdown" />
7171
</Clicked>
7272

7373
<WhileTrue ux:Name="expandDropdown">
7474
<StackPanel Offset="0,40" >
75-
<Each Items="{Property menu.ListItems}" >
76-
<DropdownOption FontSize="{Property menu.FontSize}" TextColor="{Property menu.TextColor}" Text="{name}" BackgroundColor="{Property menu.BackgroundColor}" Clicked="{onSelected}" BorderColor="{Property menu.BorderColor}" />
75+
<Each Items="{ReadProperty menu.ListItems}" >
76+
<DropdownOption FontSize="{ReadProperty menu.FontSize}" TextColor="{ReadProperty menu.TextColor}" Text="{name}" BackgroundColor="{ReadProperty menu.BackgroundColor}" Clicked="{onSelected}" BorderColor="{ReadProperty menu.BorderColor}" />
7777
</Each>
7878
</StackPanel>
7979
</WhileTrue>

‎Samples/ImageViewer/MainView.ux

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</DoubleTapped>
3434

3535
<!-- close when it gets small enough -->
36-
<WhileFloat Value="{Property TheTransform.ZoomFactor}" LessThan="0.7">
36+
<WhileFloat Value="{ReadProperty TheTransform.ZoomFactor}" LessThan="0.7">
3737
<!-- the gestures will be active at this time, so we must explicitly cancel them -->
3838
<CancelInteractions/>
3939
<Set ViewerVisible.Value="false"/>

‎Samples/UIStructure/Navigation/MainNavigator.ux

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
<string ux:Property="Title"/>
5454
<Uno.UX.FileSource ux:Property="File"/>
5555

56-
<Image File="{Property this.File}" StretchMode="PointPrecise" Color="0.4,0.4,0.5,1"/>
57-
<Text Value="{Property this.Title}" FontSize="14" Margin="0,3,0,0"/>
56+
<Image File="{ReadProperty this.File}" StretchMode="PointPrecise" Color="0.4,0.4,0.5,1"/>
57+
<Text Value="{ReadProperty this.Title}" FontSize="14" Margin="0,3,0,0"/>
5858
</StackPanel>
5959

6060
<NavIcon Title="Channels" File="Assets/calendar.png" Clicked="{goChannels}"/>

‎Samples/UIStructure/Transition/MainView.ux

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ButtonBase ux:Class="ArrowButton" Padding="5" Margin="5">
1515
<float ux:Property="Degrees"/>
1616
<Image File="Assets/play.png" Color="#000" Name="ArrowImage">
17-
<Rotation Degrees="{Property this.Degrees}"/>
17+
<Rotation Degrees="{ReadProperty this.Degrees}"/>
1818
</Image>
1919
</ButtonBase>
2020

@@ -84,7 +84,7 @@
8484
<PlusButton X="50%" Y="25%" Anchor="50%,50%" Clicked="{goSlideTop}"/>
8585

8686
<!-- A label to show the pages are changing, and that "back" is actually going back -->
87-
<Circle Width="200" Height="200" Color="{Property this.Tint}" Alignment="Center">
87+
<Circle Width="200" Height="200" Color="{ReadProperty this.Tint}" Alignment="Center">
8888
<StackPanel Alignment="Center">
8989
<Text FontSize="22" Value="{Resource Title}" Color="#000"/>
9090
<Text Alignment="Center" FontSize="28" Value="{id}" Color="#666"/>
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<Rectangle ux:Class="ImageRectangle" CornerRadius="10">
22
<FileSource ux:Property="File" />
3-
<ImageFill File="{Property this.File}" StretchMode="UniformToFill" />
3+
<ImageFill File="{ReadProperty this.File}" StretchMode="UniformToFill" />
44
</Rectangle>

‎Samples/cattr/Pages/Home/HomePageTab.ux

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<string ux:Property="Label" />
33
<PageControl ux:Dependency="pageControl" />
44
<Page ux:Dependency="page" />
5-
<WhiteText Alignment="Center" Value="{Property this.Label}" />
5+
<WhiteText Alignment="Center" Value="{ReadProperty this.Label}" />
66
<Clicked>
77
<NavigateTo NavigationContext="pageControl" Target="page" />
88
</Clicked>

0 commit comments

Comments
 (0)
Please sign in to comment.