Skip to content

Commit 70efe7a

Browse files
David BritchDavid Britch
David Britch
authored and
David Britch
committed
API deprecations
Button.Image > Button.ImageSource MenuItem.Icon > MenuItem.IconImageSource Page.Icon > Page.IconImageSource Page.BackgroundImage > Page.BackgroundImageSource NavigationPage.TitleIcon > NavigationPage.TitleIconImageSource Slider.ThumbImage > Slider.ThumbImageSource BorderRadius > CornerRadius
1 parent 865a74a commit 70efe7a

File tree

125 files changed

+393
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+393
-409
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:WorkingWithBehaviors;assembly=WorkingWithBehaviors" x:Class="WorkingWithBehaviors.NumericValidationPage" Title="Numeric" Icon="xaml.png">
2+
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:WorkingWithBehaviors;assembly=WorkingWithBehaviors" x:Class="WorkingWithBehaviors.NumericValidationPage" Title="Numeric" IconImageSource="xaml.png">
33
<StackLayout Padding="0,20,0,0">
44
<Label Text="Red when the number isn't valid" FontSize="Small" />
55
<Entry Placeholder="Enter a System.Double" local:NumericValidationBehavior.AttachBehavior="true" />
66
</StackLayout>
7-
</ContentPage>
7+
</ContentPage>

Diff for: Behaviors/AttachedNumericValidationBehavior/WorkingWithBehaviors/NumericValidationPageCS.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class NumericValidationPageCS : ContentPage
77
public NumericValidationPageCS ()
88
{
99
Title = "Numeric";
10-
Icon = "csharp.png";
10+
IconImageSource = "csharp.png";
1111

1212
var entry = new Entry { Placeholder = "Enter a System.Double" };
1313
NumericValidationBehavior.SetAttachBehavior (entry, true);
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:WorkingWithBehaviors;assembly=WorkingWithBehaviors" x:Class="WorkingWithBehaviors.NumericValidationPage" Title="Numeric" Icon="xaml.png">
2+
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:WorkingWithBehaviors;assembly=WorkingWithBehaviors" x:Class="WorkingWithBehaviors.NumericValidationPage" Title="Numeric" IconImageSource="xaml.png">
33
<StackLayout Padding="0,20,0,0">
44
<Label Text="Red when the number isn't valid" FontSize="Small" />
55
<Entry Placeholder="Enter a System.Double">
@@ -8,4 +8,4 @@
88
</Entry.Behaviors>
99
</Entry>
1010
</StackLayout>
11-
</ContentPage>
11+
</ContentPage>

Diff for: Behaviors/NumericValidationBehavior/WorkingWithBehaviors/NumericValidationPageCS.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class NumericValidationPageCS : ContentPage
77
public NumericValidationPageCS ()
88
{
99
Title = "Numeric";
10-
Icon = "csharp.png";
10+
IconImageSource = "csharp.png";
1111

1212
var entry = new Entry { Placeholder = "Enter a System.Double" };
1313
entry.Behaviors.Add (new NumericValidationBehavior ());
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:WorkingWithBehaviors" x:Class="WorkingWithBehaviors.HomePage" Title="Numeric" Icon="xaml.png">
2+
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:WorkingWithBehaviors" x:Class="WorkingWithBehaviors.HomePage" Title="Numeric" IconImageSource="xaml.png">
33
<local:NumericValidationPage />
4-
</TabbedPage>
4+
</TabbedPage>

Diff for: Behaviors/NumericValidationBehaviorStyle/WorkingWithBehaviors/NumericValidationPageCS.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class NumericValidationPageCS : ContentPage
77
public NumericValidationPageCS ()
88
{
99
Title = "Numeric";
10-
Icon = "csharp.png";
10+
IconImageSource = "csharp.png";
1111

1212
var entry = new Entry { Placeholder = "Enter a System.Double" };
1313
NumericValidationBehavior.SetAttachBehavior (entry, true);

Diff for: CustomRenderers/ContentPage/Droid/Properties/AndroidManifest.xml

100755100644
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.customrenderer">
33
<uses-sdk android:minSdkVersion="15" />
4-
<application android:label="CustomRenderer">
5-
</application>
4+
<application android:label="CustomRenderer"></application>
65
<uses-permission android:name="android.permission.CAMERA" />
76
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
87
</manifest>

Diff for: EmployeeDirectory/EmployeeDirectory.Android/Properties/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
<uses-library android:name="com.google.android.maps" />
66
</application>
77
<uses-permission android:name="android.permission.CALL_PHONE" />
8-
</manifest>
8+
</manifest>

Diff for: EmployeeDirectory/EmployeeDirectoryUI/ViewsCSharp/LoginView.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public LoginView()
5454
Children = { logo, usernameEntry, passwordEntry, grid }
5555
};
5656

57-
BackgroundImage = "login_box";
57+
BackgroundImageSource = "login_box";
5858

5959
}
6060
else

Diff for: EmployeeDirectory/EmployeeDirectoryUI/ViewsXaml/LoginXaml.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns="http://xamarin.com/schemas/2014/forms"
44
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
55
x:Class="EmployeeDirectoryUI.Xaml.LoginXaml"
6-
BackgroundImage="login_box">
6+
BackgroundImageSource="login_box">
77
<ContentPage.Content>
88
<OnPlatform x:TypeArguments="View">
99
<OnPlatform.iOS>

Diff for: FormsGallery/FormsGallery/FormsGallery/HomePage.xaml

+30-30
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77
Padding="10, 0">
88

99
<local:CodeExamplesMainPage Title="C# Pages">
10-
<local:CodeExamplesMainPage.Icon>
11-
<OnPlatform x:TypeArguments="FileImageSource">
10+
<local:CodeExamplesMainPage.IconImageSource>
11+
<OnPlatform x:TypeArguments="ImageSource">
1212
<On Platform="iOS, Android" Value="csharp.png" />
1313
</OnPlatform>
14-
</local:CodeExamplesMainPage.Icon>
14+
</local:CodeExamplesMainPage.IconImageSource>
1515
</local:CodeExamplesMainPage>
16-
16+
1717
<ContentPage Title="XAML Pages">
18-
<local:CodeExamplesMainPage.Icon>
19-
<OnPlatform x:TypeArguments="FileImageSource">
18+
<local:CodeExamplesMainPage.IconImageSourcen>
19+
<OnPlatform x:TypeArguments="ImageSource">
2020
<On Platform="iOS, Android" Value="xaml.png" />
2121
</OnPlatform>
22-
</local:CodeExamplesMainPage.Icon>
23-
22+
</local:CodeExamplesMainPage.IconImageSource>
23+
2424
<TableView Intent="Menu">
2525
<TableRoot>
2626
<TableSection Title="Views for Presentation">
27-
27+
2828
<TextCell Text="Label"
2929
Detail="Display a text string"
3030
Command="{Binding NavigateCommand}"
@@ -57,12 +57,12 @@
5757
</TableSection>
5858

5959
<TableSection Title="Views that Initiate Commands">
60-
60+
6161
<TextCell Text="Button"
6262
Detail="Initiate a command"
6363
Command="{Binding NavigateCommand}"
6464
CommandParameter="{x:Type local:XamlExamples.ButtonDemoPage}" />
65-
65+
6666
<TextCell Text="ImageButton"
6767
Detail="Initiate a command"
6868
Command="{Binding NavigateCommand}"
@@ -73,9 +73,9 @@
7373
Command="{Binding NavigateCommand}"
7474
CommandParameter="{x:Type local:XamlExamples.SearchBarDemoPage}" />
7575
</TableSection>
76-
76+
7777
<TableSection Title="Views for Setting Values">
78-
78+
7979
<TextCell Text= "Slider (double)"
8080
Detail="Select a number from a continuous range"
8181
Command="{Binding NavigateCommand}"
@@ -85,12 +85,12 @@
8585
Detail="Select a number from discrete increments"
8686
Command="{Binding NavigateCommand}"
8787
CommandParameter="{x:Type local:XamlExamples.StepperDemoPage}" />
88-
88+
8989
<TextCell Text="Switch (bool)"
9090
Detail="Select a Boolean value"
9191
Command="{Binding NavigateCommand}"
9292
CommandParameter="{x:Type local:XamlExamples.SwitchDemoPage}" />
93-
93+
9494
<TextCell Text="DatePicker"
9595
Detail="Select a date"
9696
Command="{Binding NavigateCommand}"
@@ -103,7 +103,7 @@
103103
</TableSection>
104104

105105
<TableSection Title="Views for Editing Text">
106-
106+
107107
<TextCell Text="Entry (single line)"
108108
Detail="Edit a single line of text"
109109
Command="{Binding NavigateCommand}"
@@ -116,30 +116,30 @@
116116
</TableSection>
117117

118118
<TableSection Title="Views to Indicate Activity">
119-
119+
120120
<TextCell Text="ActivityIndicator"
121121
Detail="Show that the program is busy"
122122
Command="{Binding NavigateCommand}"
123123
CommandParameter="{x:Type local:XamlExamples.ActivityIndicatorDemoPage}" />
124-
124+
125125
<TextCell Text="ProgressBar"
126126
Detail="Show the progress of a program task"
127127
Command="{Binding NavigateCommand}"
128128
CommandParameter="{x:Type local:XamlExamples.ProgressBarDemoPage}" />
129129
</TableSection>
130130

131131
<TableSection Title="Views that Display Collections">
132-
132+
133133
<TextCell Text="CollectionView"
134134
Detail="Select from a list of data items"
135135
Command="{Binding NavigateCommand}"
136136
CommandParameter="{x:Type local:XamlExamples.CollectionViewDemoPage}" />
137-
137+
138138
<TextCell Text="ListView"
139139
Detail="Select from a list of data items"
140140
Command="{Binding NavigateCommand}"
141141
CommandParameter="{x:Type local:XamlExamples.ListViewDemoPage}" />
142-
142+
143143
<TextCell Text="Picker"
144144
Detail="Select from a list of text items"
145145
Command="{Binding NavigateCommand}"
@@ -149,7 +149,7 @@
149149
Detail="Show a table suitable for a menu"
150150
Command="{Binding NavigateCommand}"
151151
CommandParameter="{x:Type local:XamlExamples.TableViewMenuDemoPage}" />
152-
152+
153153
<TextCell Text="TableView for a form"
154154
Detail="Show a table suitable for a form"
155155
Command="{Binding NavigateCommand}"
@@ -204,17 +204,17 @@
204204
Detail="Arrange children in a stack"
205205
Command="{Binding NavigateCommand}"
206206
CommandParameter="{x:Type local:XamlExamples.StackLayoutDemoPage}" />
207-
207+
208208
<TextCell Text="AbsoluteLayout"
209209
Detail="Arrange children by coordinate positions"
210210
Command="{Binding NavigateCommand}"
211211
CommandParameter="{x:Type local:XamlExamples.AbsoluteLayoutDemoPage}" />
212-
212+
213213
<TextCell Text="Grid"
214214
Detail="Arrange children in a grid"
215215
Command="{Binding NavigateCommand}"
216216
CommandParameter="{x:Type local:XamlExamples.GridDemoPage}" />
217-
217+
218218
<TextCell Text="RelativeLayout"
219219
Detail="Arrange children relative to each other"
220220
Command="{Binding NavigateCommand}"
@@ -227,12 +227,12 @@
227227
</TableSection>
228228

229229
<TableSection Title="Pages">
230-
230+
231231
<TextCell Text="ContentPage"
232232
Detail="Present a normal page"
233233
Command="{Binding NavigateCommand}"
234234
CommandParameter="{x:Type local:XamlExamples.ContentPageDemoPage}" />
235-
235+
236236
<TextCell Text="NavigationPage"
237237
Detail="Present a navigatable page"
238238
Command="{Binding NavigateCommand}"
@@ -242,12 +242,12 @@
242242
Detail="Present two pages with a list and an item"
243243
Command="{Binding NavigateCommand}"
244244
CommandParameter="{x:Type local:XamlExamples.MasterDetailPageDemoPage}" />
245-
245+
246246
<TextCell Text="TabbedPage"
247247
Detail="Present a page with tabs"
248248
Command="{Binding NavigateCommand}"
249249
CommandParameter="{x:Type local:XamlExamples.TabbedPageDemoPage}" />
250-
250+
251251
<TextCell Text="CarouselPage"
252252
Detail="Present a horizontally scrollable page"
253253
Command="{Binding NavigateCommand}"
@@ -256,4 +256,4 @@
256256
</TableRoot>
257257
</TableView>
258258
</ContentPage>
259-
</TabbedPage>
259+
</TabbedPage>

Diff for: FormsGallery/FormsGallery/FormsGallery/XamlExamples/FlexLayoutDemoPage.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<Setter Property="FontSize" Value="Large" />
3333
<Setter Property="TextColor" Value="White" />
3434
<Setter Property="BackgroundColor" Value="Green" />
35-
<Setter Property="BorderRadius" Value="20" />
35+
<Setter Property="CornerRadius" Value="20" />
3636
</Style>
3737
</ContentPage.Resources>
3838

Diff for: GetStarted/Notes/Styled/Notes/NoteEntryPage.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<Setter Property="FontSize" Value="Medium" />
1717
<Setter Property="BackgroundColor" Value="LightGray" />
1818
<Setter Property="TextColor" Value="Black" />
19-
<Setter Property="BorderRadius" Value="5" />
19+
<Setter Property="CornerRadius" Value="5" />
2020
</Style>
2121
</ContentPage.Resources>
2222

Diff for: MobileCRM/MobileCRM.Android/Properties/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
-->
1212
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="INSERT_MAP_API_KEY_HERE" />
1313
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
14-
<!-- Necessary for apps that target Android 9.0 or higher -->
14+
<!-- Necessary for apps that target Android 9.0 or higher -->
1515
<uses-library android:name="org.apache.http.legacy" android:required="false" />
1616
</application>
1717
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

Diff for: MobileCRM/MobileCRM.Shared/Pages/ListPage.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public ListPage(MasterViewModel<T> viewModel) : base(viewModel)
2828
//Set value will directly set the value to "List"
2929
this.SetValue(Page.TitleProperty, "List");
3030
//This will bind to our BindingContext.Icon
31-
this.SetBinding(Page.IconProperty, "Icon");
31+
this.SetBinding(Page.IconImageSourceProperty, "Icon");
3232

3333
var list = new ListView();
3434

Diff for: MobileCRM/MobileCRM.Shared/Pages/MapPage.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public MapPage(MapViewModel<T> viewModel)
4343
BindingContext = viewModel;
4444

4545
this.SetBinding(Page.TitleProperty, "Title");
46-
this.SetBinding(Page.IconProperty, "Icon");
46+
this.SetBinding(Page.IconImageSourceProperty, "Icon");
4747

4848
var map = MakeMap();
4949
var stack = new StackLayout { Spacing = 0 };

Diff for: MobileCRM/MobileCRM.Shared/Pages/MasterPage.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ public MasterPage(OptionItem menuItem)
1616
BindingContext = viewModel;
1717

1818
this.SetValue(Page.TitleProperty, menuItem.Title);
19-
this.SetValue(Page.IconProperty, menuItem.Icon);
19+
this.SetValue(Page.IconImageSourceProperty, menuItem.IconImageSource);
2020

2121
Map = new MapPage<T>(viewModel);
22-
List = new ListPage<T>(viewModel) { Icon = "list.png" };
22+
List = new ListPage<T>(viewModel) { IconImageSource = "list.png" };
2323

2424
this.Children.Add(Map);
2525
this.Children.Add(List);

Diff for: MobileCRM/MobileCRM.Shared/Pages/RootPage.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ namespace MobileCRM.Shared.Pages
99
public class RootPage : MasterDetailPage
1010
{
1111
OptionItem previousItem;
12-
12+
1313
public RootPage ()
14-
{
15-
var optionsPage = new MenuPage { Icon = "settings.png", Title = "menu" };
14+
{
15+
var optionsPage = new MenuPage { IconImageSource = "settings.png", Title = "menu" };
1616
optionsPage.Menu.ItemSelected += (sender, e) => NavigateTo(e.SelectedItem as OptionItem);
1717
Master = optionsPage;
1818
NavigateTo(optionsPage.Menu.ItemsSource.Cast<OptionItem>().First());
19-
ShowLoginDialog();
19+
ShowLoginDialog();
2020
}
2121

2222
async void ShowLoginDialog()

Diff for: Navigation/MasterDetailPage/MasterDetailPageNavigation/CS/MasterPageCS.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public MasterPageCS()
5353
SeparatorVisibility = SeparatorVisibility.None
5454
};
5555

56-
Icon = "hamburger.png";
56+
IconImageSource = "hamburger.png";
5757
Title = "Personal Organiser";
5858
Padding = new Thickness(0, 40, 0, 0);
5959
Content = new StackLayout

Diff for: Navigation/MasterDetailPage/MasterDetailPageNavigation/XAML/MasterPage.xaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
2+
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:local="using:MasterDetailPageNavigation"
55
x:Class="MasterDetailPageNavigation.MasterPage"
66
Padding="0,40,0,0"
7-
Icon="hamburger.png"
7+
IconImageSource="hamburger.png"
88
Title="Personal Organiser">
99
<StackLayout>
1010
<ListView x:Name="listView" x:FieldModifier="public">

Diff for: Navigation/Pop-ups/WorkingWithPopups/MainPage.xaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
2+
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:local="clr-namespace:WorkingWithPopups;assembly=WorkingWithPopups"
55
x:Class="WorkingWithPopups.MainPage">
66
<TabbedPage.Children>
7-
<local:AlertPage Title="Alerts" Icon="csharp.png" />
8-
<local:ActionSheetPage Title="ActionSheets" Icon="csharp.png" />
7+
<local:AlertPage Title="Alerts" IconImageSource="csharp.png" />
8+
<local:ActionSheetPage Title="ActionSheets" IconImageSource="csharp.png" />
99
</TabbedPage.Children>
1010
</TabbedPage>

0 commit comments

Comments
 (0)