This commit is contained in:
David Britch 2021-02-01 12:53:22 +00:00
Родитель d3900c4aca
Коммит 187c433109
191 изменённых файлов: 23257 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,19 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with your package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

Просмотреть файл

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{c9e5eea5-ca05-42a1-839b-61506e0a37df}</TemplateGuid>
<OutputType>Library</OutputType>
<RootNamespace>CSharpForMarkupDemos.Droid</RootNamespace>
<AssemblyName>CSharpForMarkupDemos.Android</AssemblyName>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1687" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.xml" />
<AndroidResource Include="Resources\layout\Toolbar.xml" />
<AndroidResource Include="Resources\values\styles.xml" />
<AndroidResource Include="Resources\values\colors.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon_round.xml" />
<AndroidResource Include="Resources\mipmap-hdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-hdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-mdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-mdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CSharpForMarkupDemos\CSharpForMarkupDemos.csproj">
<Project>{8770738D-2AD6-4B69-8502-ACC92F55B3F2}</Project>
<Name>CSharpForMarkupDemos</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,31 @@
using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Runtime;
using CSharpForMarkupDemos.Helpers;
namespace CSharpForMarkupDemos.Droid
{
[Activity(Label = "CSharpForMarkupDemos", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
TaskHelper.InitializeFromUIThread();
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
}

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.csharpformarkupdemos">
<uses-sdk android:minSdkVersion="21" />
<application android:label="CSharpForMarkupDemos.Android"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

Просмотреть файл

@ -0,0 +1,34 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CSharpForMarkupDemos.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CSharpForMarkupDemos.Android")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// Add some common permissions, these can be removed if not needed
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]

Просмотреть файл

@ -0,0 +1,50 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.xml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable-hdpi/
icon.png
drawable-ldpi/
icon.png
drawable-mdpi/
icon.png
layout/
main.xml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called
"Resource" that contains the tokens for each one of the resources included. For example,
for the above Resources layout, this is what the Resource class would expose:
public class Resource {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

Просмотреть файл

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/sliding_tabs" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" app:tabIndicatorColor="@android:color/white" app:tabGravity="fill" app:tabMode="fixed" />

Просмотреть файл

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 11 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 6.9 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 18 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 12 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 33 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 19 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 51 KiB

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="launcher_background">#FFFFFF</color>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

Просмотреть файл

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
</style>
<!-- Base theme applied no matter what API -->
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
<item name="windowNoTitle">true</item>
<!--We will be using the toolbar so no need to show ActionBar-->
<item name="windowActionBar">false</item>
<!-- Set theme colors from https://aka.ms/material-colors -->
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">#2196F3</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">#1976D2</item>
<!-- colorAccent is used as the default value for colorControlActivated
which is used to tint widgets -->
<item name="colorAccent">#FF4081</item>
<!-- You can also set colorControlNormal, colorControlActivated
colorControlHighlight and colorSwitchThumbNormal. -->
<item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF4081</item>
</style>
</resources>

Просмотреть файл

@ -0,0 +1,7 @@
<Application
x:Class="CSharpForMarkupDemos.UWP.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CSharpForMarkupDemos.UWP">
</Application>

Просмотреть файл

@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace CSharpForMarkupDemos.UWP
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
Xamarin.Forms.Forms.Init(e);
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.5 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.9 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.1 KiB

Просмотреть файл

@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CSharpForMarkupDemos.UWP</RootNamespace>
<AssemblyName>CSharpForMarkupDemos.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.9</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms">
<Version>4.8.0.1687</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CSharpForMarkupDemos\CSharpForMarkupDemos.csproj">
<Project>{8770738d-2ad6-4b69-8502-acc92f55b3f2}</Project>
<Name>CSharpForMarkupDemos</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -0,0 +1,15 @@
<forms:WindowsPage
x:Class="CSharpForMarkupDemos.UWP.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CSharpForMarkupDemos.UWP"
xmlns:forms="using:Xamarin.Forms.Platform.UWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
</Grid>
</forms:WindowsPage>

Просмотреть файл

@ -0,0 +1,14 @@
using CSharpForMarkupDemos.Helpers;
namespace CSharpForMarkupDemos.UWP
{
public sealed partial class MainPage
{
public MainPage()
{
TaskHelper.InitializeFromUIThread();
this.InitializeComponent();
this.LoadApplication(new CSharpForMarkupDemos.App());
}
}
}

Просмотреть файл

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">
<Identity
Name="dbcd8a25-d256-44f6-99ea-49e4814b8f3b"
Publisher="CN=Dave"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="dbcd8a25-d256-44f6-99ea-49e4814b8f3b" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>CSharpForMarkupDemos.UWP</DisplayName>
<PublisherDisplayName>Dave</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="CSharpForMarkupDemos.UWP.App">
<uap:VisualElements
DisplayName="CSharpForMarkupDemos.UWP"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="CSharpForMarkupDemos.UWP"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

Просмотреть файл

@ -0,0 +1,29 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CSharpForMarkupDemos.UWP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CSharpForMarkupDemos.UWP")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]

Просмотреть файл

@ -0,0 +1,31 @@
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>

Просмотреть файл

@ -0,0 +1,29 @@
using CSharpForMarkupDemos.Helpers;
using Foundation;
using UIKit;
namespace CSharpForMarkupDemos.iOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register("AppDelegate")]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
TaskHelper.InitializeFromUIThread();
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
}
}

Просмотреть файл

@ -0,0 +1,117 @@
{
"images": [
{
"scale": "2x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon40.png"
},
{
"scale": "3x",
"size": "20x20",
"idiom": "iphone",
"filename": "Icon60.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon58.png"
},
{
"scale": "3x",
"size": "29x29",
"idiom": "iphone",
"filename": "Icon87.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon80.png"
},
{
"scale": "3x",
"size": "40x40",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "2x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon120.png"
},
{
"scale": "3x",
"size": "60x60",
"idiom": "iphone",
"filename": "Icon180.png"
},
{
"scale": "1x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon20.png"
},
{
"scale": "2x",
"size": "20x20",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "1x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon29.png"
},
{
"scale": "2x",
"size": "29x29",
"idiom": "ipad",
"filename": "Icon58.png"
},
{
"scale": "1x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon40.png"
},
{
"scale": "2x",
"size": "40x40",
"idiom": "ipad",
"filename": "Icon80.png"
},
{
"scale": "1x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon76.png"
},
{
"scale": "2x",
"size": "76x76",
"idiom": "ipad",
"filename": "Icon152.png"
},
{
"scale": "2x",
"size": "83.5x83.5",
"idiom": "ipad",
"filename": "Icon167.png"
},
{
"scale": "1x",
"size": "1024x1024",
"idiom": "ios-marketing",
"filename": "Icon1024.png"
}
],
"properties": {},
"info": {
"version": 1,
"author": "xcode"
}
}

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 69 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 3.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.6 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 5.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 845 B

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.5 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.7 KiB

Просмотреть файл

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}</ProjectGuid>
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{6143fdea-f3c2-4a09-aafa-6e230626515e}</TemplateGuid>
<OutputType>Exe</OutputType>
<RootNamespace>CSharpForMarkupDemos.iOS</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>CSharpForMarkupDemos.iOS</AssemblyName>
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>x86_64</MtouchArch>
<MtouchLink>None</MtouchLink>
<MtouchDebug>true</MtouchDebug>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchLink>None</MtouchLink>
<MtouchArch>x86_64</MtouchArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\iPhone\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64</MtouchArch>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchDebug>true</MtouchDebug>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
<MtouchLink>None</MtouchLink>
<MtouchInterpreter>-all</MtouchInterpreter>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\iPhone\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<MtouchArch>ARM64</MtouchArch>
<CodesignKey>iPhone Developer</CodesignKey>
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AppDelegate.cs" />
<None Include="Entitlements.plist" />
<None Include="Info.plist" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon1024.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon180.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon167.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon152.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon120.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon87.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon80.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon76.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon60.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon58.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon40.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon29.png">
<Visible>false</Visible>
</ImageAsset>
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon20.png">
<Visible>false</Visible>
</ImageAsset>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1687" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\CSharpForMarkupDemos\CSharpForMarkupDemos.csproj">
<Project>{8770738D-2AD6-4B69-8502-ACC92F55B3F2}</Project>
<Name>CSharpForMarkupDemos</Name>
</ProjectReference>
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleDisplayName</key>
<string>CSharpForMarkupDemos</string>
<key>CFBundleIdentifier</key>
<string>com.companyname.CSharpForMarkupDemos</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleName</key>
<string>CSharpForMarkupDemos</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace CSharpForMarkupDemos.iOS
{
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, "AppDelegate");
}
}
}

Просмотреть файл

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CSharpForMarkupDemos.iOS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CSharpForMarkupDemos.iOS")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 8.7 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 10 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 34 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 7.1 KiB

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 8.2 KiB

Просмотреть файл

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238" />
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="gAE-YM-kbH">
<objects>
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43" />
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ" />
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
<rect key="frame" x="0.0" y="0.0" width="600" height="600" />
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" />
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="Icon-60.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
<rect key="frame" x="270" y="270" width="60" height="60" />
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0" />
</imageView>
</subviews>
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB" />
<constraints>
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39" />
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41" />
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder" />
</objects>
<point key="canvasLocation" x="349" y="339" />
</scene>
</scenes>
<resources>
<image name="Icon-60.png" width="180" height="180" />
</resources>
</document>

Просмотреть файл

@ -0,0 +1,158 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29806.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpForMarkupDemos.Android", "CSharpForMarkupDemos.Android\CSharpForMarkupDemos.Android.csproj", "{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpForMarkupDemos.iOS", "CSharpForMarkupDemos.iOS\CSharpForMarkupDemos.iOS.csproj", "{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpForMarkupDemos", "CSharpForMarkupDemos\CSharpForMarkupDemos.csproj", "{8770738D-2AD6-4B69-8502-ACC92F55B3F2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpForMarkupDemos.UWP", "CSharpForMarkupDemos.UWP\CSharpForMarkupDemos.UWP.csproj", "{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|ARM.Build.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|ARM.Deploy.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|ARM64.Build.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|ARM64.Deploy.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|iPhone.Build.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|x64.ActiveCfg = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|x64.Build.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|x64.Deploy.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|x86.ActiveCfg = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|x86.Build.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Debug|x86.Deploy.0 = Debug|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|Any CPU.Build.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|Any CPU.Deploy.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|ARM.ActiveCfg = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|ARM.Build.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|ARM.Deploy.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|ARM64.ActiveCfg = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|ARM64.Build.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|ARM64.Deploy.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|iPhone.ActiveCfg = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|iPhone.Build.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|x64.ActiveCfg = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|x64.Build.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|x64.Deploy.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|x86.ActiveCfg = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|x86.Build.0 = Release|Any CPU
{D2553545-AAAA-407A-B4FC-5B045EFAE1E5}.Release|x86.Deploy.0 = Release|Any CPU
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Debug|ARM.ActiveCfg = Debug|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Debug|ARM64.ActiveCfg = Debug|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Debug|iPhone.ActiveCfg = Debug|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Debug|iPhone.Build.0 = Debug|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Debug|x64.ActiveCfg = Debug|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Debug|x86.ActiveCfg = Debug|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Release|ARM.ActiveCfg = Release|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Release|ARM64.ActiveCfg = Release|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Release|iPhone.ActiveCfg = Release|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Release|iPhone.Build.0 = Release|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Release|x64.ActiveCfg = Release|iPhone
{42B19A08-8E98-4759-BBE7-BB19BDFCC2F5}.Release|x86.ActiveCfg = Release|iPhone
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|ARM.ActiveCfg = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|ARM.Build.0 = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|ARM64.Build.0 = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|iPhone.Build.0 = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|x64.ActiveCfg = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|x64.Build.0 = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|x86.ActiveCfg = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Debug|x86.Build.0 = Debug|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|Any CPU.Build.0 = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|ARM.ActiveCfg = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|ARM.Build.0 = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|ARM64.ActiveCfg = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|ARM64.Build.0 = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|iPhone.ActiveCfg = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|iPhone.Build.0 = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|x64.ActiveCfg = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|x64.Build.0 = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|x86.ActiveCfg = Release|Any CPU
{8770738D-2AD6-4B69-8502-ACC92F55B3F2}.Release|x86.Build.0 = Release|Any CPU
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|Any CPU.ActiveCfg = Debug|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|Any CPU.Build.0 = Debug|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|Any CPU.Deploy.0 = Debug|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|ARM.ActiveCfg = Debug|ARM
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|ARM.Build.0 = Debug|ARM
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|ARM.Deploy.0 = Debug|ARM
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|ARM64.ActiveCfg = Debug|ARM64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|ARM64.Build.0 = Debug|ARM64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|ARM64.Deploy.0 = Debug|ARM64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|iPhone.ActiveCfg = Debug|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|x64.ActiveCfg = Debug|x64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|x64.Build.0 = Debug|x64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|x64.Deploy.0 = Debug|x64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|x86.ActiveCfg = Debug|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|x86.Build.0 = Debug|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Debug|x86.Deploy.0 = Debug|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|Any CPU.ActiveCfg = Release|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|Any CPU.Build.0 = Release|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|Any CPU.Deploy.0 = Release|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|ARM.ActiveCfg = Release|ARM
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|ARM.Build.0 = Release|ARM
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|ARM.Deploy.0 = Release|ARM
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|ARM64.ActiveCfg = Release|ARM64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|ARM64.Build.0 = Release|ARM64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|ARM64.Deploy.0 = Release|ARM64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|iPhone.ActiveCfg = Release|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|iPhoneSimulator.ActiveCfg = Release|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|x64.ActiveCfg = Release|x64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|x64.Build.0 = Release|x64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|x64.Deploy.0 = Release|x64
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|x86.ActiveCfg = Release|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|x86.Build.0 = Release|x86
{BFACCCA8-2B79-4EF2-84F5-5ED44E9996B8}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {05F5D706-5D1E-4DFC-AF5A-E7F1498FECFC}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,66 @@
using System;
using System.Threading.Tasks;
using Xamarin.Essentials;
using Xamarin.Forms;
using CSharpForMarkupDemos.Views;
using CSharpForMarkupDemos.ViewModels;
using CSharpForMarkupDemos.Helpers;
namespace CSharpForMarkupDemos
{
public class App : Application
{
public static new App Current => (App)Application.Current;
RegistrationCodePage registrationCodePage;
NestedListPage nestedListPage;
AnimatedPage animatedPage;
public MainViewModel MainViewModel { get; private set; }
public RegistrationCodeViewModel RegistrationCodeViewModel { get; private set; }
public NestedListViewModel NestedListViewModel { get; private set; }
public App()
{
Device.SetFlags(new string[] { "Markup_Experimental" });
Resources = Styles.Implicit;
MainViewModel = new MainViewModel(this);
MainPage = new NavigationPage(new MainPage());
}
public Task ContinueToRegistration()
{
if (RegistrationCodeViewModel == null)
RegistrationCodeViewModel = new RegistrationCodeViewModel(this);
if (registrationCodePage == null)
registrationCodePage = new RegistrationCodePage();
return TaskHelper.RunOnUIThread(() => MainPage.Navigation.PushAsync(registrationCodePage, true));
}
public Task ContinueToNestedList()
{
if (NestedListViewModel == null)
NestedListViewModel = new NestedListViewModel(this);
if (nestedListPage == null)
nestedListPage = new NestedListPage();
return TaskHelper.RunOnUIThread(() => MainPage.Navigation.PushAsync(nestedListPage, true));
}
public Task ContinueToAnimatedPage()
{
if (animatedPage == null)
animatedPage = new AnimatedPage();
return TaskHelper.RunOnUIThread(() => MainPage.Navigation.PushAsync(animatedPage, true));
}
public Task OpenUri(string uri) => Launcher.OpenAsync(new Uri(uri));
public Task DisplayAlert(string title, string message, string cancel = "OK") => MainPage.DisplayAlert(title, message, cancel);
public Task ReturnToPreviousView() => MainPage.Navigation.PopAsync(true);
}
}

Просмотреть файл

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1687" />
<PackageReference Include="Xamarin.Essentials" Version="1.3.1" />
<PackageReference Include="PropertyChanged.Fody" Version="3.2.6" />
</ItemGroup>
<ItemGroup>
<Folder Include="Helpers\" />
<Folder Include="ViewModels\" />
<Folder Include="Views\" />
<Folder Include="Controls\" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,90 @@
using Xamarin.Forms;
using Xamarin.Forms.Markup;
using Xamarin.Forms.Markup.LeftToRight;
using static Xamarin.Forms.Markup.GridRowsColumns;
namespace CSharpForMarkupDemos.Controls
{
public static class PageHeader
{
static double rowHeight = 25;
public static double ButtonDistanceFromTopOfPage => rowHeight * 2;
public static double ButtonHeight => rowHeight;
enum Row
{
StatusBar,
Title,
Subtitle
}
enum Col
{
First,
BackButton = First,
Title,
Last = Title
}
public static Grid Create(
double pageMarginSize,
string titlePropertyName = null,
string subTitlePropertyName = null,
string returnToPreviousViewCommandPropertyName = null,
string allowBackNavigationPropertyName = null,
bool centerTitle = false)
{
var grid = new Grid
{
BackgroundColor = Color.FromHex("#1976D2"),
ColumnSpacing = 0,
ColumnDefinitions = Columns.Define(
(Col.BackButton, 60),
(Col.Title, GridLength.Star)
),
RowDefinitions = Rows.Define(
(Row.StatusBar, Device.RuntimePlatform == Device.iOS ? rowHeight : 0),
(Row.Title, rowHeight),
(Row.Subtitle, rowHeight)
),
Children =
{
new ContentView
{
Content = (returnToPreviousViewCommandPropertyName != null) ?
new Button { Text = "<", TextColor = Color.White, BackgroundColor = Color.FromHex("#1976D2") } .Font (24, bold: true)
.Left () .CenterVertical ()
.Bind (Button.CommandProperty, returnToPreviousViewCommandPropertyName)
: null
} .Row (Row.Title, Row.Subtitle) .Column (Col.BackButton) .Padding (pageMarginSize, 0)
.Invoke (b => { if (allowBackNavigationPropertyName != null) b.Bind (ContentView.IsVisibleProperty, allowBackNavigationPropertyName); }),
new Label
{
LineBreakMode = LineBreakMode.TailTruncation,
HorizontalOptions = centerTitle ? LayoutOptions.Center : LayoutOptions.Start,
VerticalOptions = subTitlePropertyName != null ? LayoutOptions.End : LayoutOptions.Center,
TextColor = Color.White
} .Bold ()
.Row (Row.Title, subTitlePropertyName != null ? Row.Title : Row.Subtitle) .Column (centerTitle ? Col.First : Col.Title, centerTitle ? Col.Last : Col.Title)
.Invoke (l => { if (titlePropertyName != null) l.Bind(titlePropertyName); })
}
};
if (subTitlePropertyName != null) grid.Children.Add(
new Label
{
LineBreakMode = LineBreakMode.TailTruncation, TextColor = Color.White,
HorizontalOptions = centerTitle ? LayoutOptions.Center : LayoutOptions.Start } .Bold ()
.Row (Row.Subtitle) .Column (centerTitle ? Col.First : Col.Title, centerTitle ? Col.Last : Col.Title) .Top ()
.Bind (subTitlePropertyName)
);
return grid;
}
}
}

Просмотреть файл

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<PropertyChanged />
</Weavers>

Просмотреть файл

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEquality" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

Просмотреть файл

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace CSharpForMarkupDemos.Helpers
{
public static class AnimationExtensions
{
public static void StaggerIn(this IEnumerable<View> children, float translation, double delay)
{
int i = 0;
foreach (View view in children)
{
view.Opacity = 0;
view.TranslationY = translation;
Task.Delay(TimeSpan.FromSeconds(i++ * delay))
.ContinueWith(_ =>
{
view.FadeTo(1);
view.TranslateTo(0, 0, easing: Easing.CubicOut);
});
}
}
}
}

Просмотреть файл

@ -0,0 +1,184 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Input;
namespace CSharpForMarkupDemos.Helpers
{
public class RelayCommand : ICommand
{
readonly Action execute;
readonly Func<Task> asyncExecute;
Func<bool> canExecute;
int executingCount;
public RelayCommand(Action execute, Func<bool> canExecute = null)
{
if (execute == null)
throw new ArgumentNullException(nameof(execute));
this.execute = execute;
this.canExecute = canExecute;
}
// This ctor is protected here and public in a derived class, to allow simple initialization like new RelayCommand(MyMethod) without errors due to ambiguity
protected RelayCommand(Func<Task> execute, Func<bool> canExecute = null)
{
if (execute == null)
throw new ArgumentNullException(nameof(execute));
this.asyncExecute = execute;
this.canExecute = canExecute;
}
/// <summary>
/// If no canExecute deletage is provided, CanExecute allows a single simultaneous command execution
/// </summary>
/// <param name="parameter">Ignored; this is the paremeterless command class</param>
/// <returns></returns>
public bool CanExecute(object parameter = null)
{
try
{
return canExecute != null ? canExecute() : executingCount == 0;
}
catch (Exception ex)
{
XLog.Trace(ex);
return true;
}
}
public event EventHandler CanExecuteChanged;
public void RaiseCanExecuteChanged()
{
CanExecuteChanged?.Invoke(this, EventArgs.Empty);
}
// Asynchronous command handling based on http://stackoverflow.com/a/31595509/6043538
public async void Execute(object parameter = null)
{
bool couldExecuteBeforeExecute = CanExecute();
if (!couldExecuteBeforeExecute) return;
Interlocked.Increment(ref executingCount);
bool couldExecuteDuringExecute = CanExecute();
if (couldExecuteDuringExecute != couldExecuteBeforeExecute) RaiseCanExecuteChanged(); // TODO: test if always raising canexecutechanged does not disturb normal UI element update during a short synchronous command. If so, keep preventing multiple execution but only raise CanExecuteChanged for asynchrounous commands
try
{
if (execute != null) execute(); else await asyncExecute();
}
catch (Exception ex)
{
XLog.Trace(ex);
}
finally
{
Interlocked.Decrement(ref executingCount);
bool couldExecuteAfterExecute = CanExecute();
if (couldExecuteAfterExecute != couldExecuteDuringExecute) RaiseCanExecuteChanged();
}
}
}
public class RelayCommandAsync : RelayCommand
{
// This ctor is public here and protected in the base class, to allow simple initialization like new RelayCommandAsync(MyMethod) without errors due to ambiguity
public RelayCommandAsync(Func<Task> execute, Func<bool> canExecute = null) : base(execute, canExecute) { }
}
public class RelayCommand<TParameter> : ICommand
{
readonly Action<TParameter> execute;
readonly Func<TParameter, Task> asyncExecute;
Func<TParameter, bool> canExecute;
int executingCount;
public RelayCommand(Action<TParameter> execute, Func<TParameter, bool> canExecute = null)
{
if (execute == null)
throw new ArgumentNullException(nameof(execute));
this.execute = execute;
this.canExecute = canExecute;
}
// This ctor is protected here and public in a derived class, to allow simple initialization like new RelayCommand(MyMethod) without errors due to ambiguity
protected RelayCommand(Func<TParameter, Task> execute, Func<TParameter, bool> canExecute = null)
{
if (execute == null)
throw new ArgumentNullException(nameof(execute));
asyncExecute = execute;
this.canExecute = canExecute;
}
/// <summary>
/// If no canExecute deletage is provided, CanExecute allows a single simultaneous command execution
/// </summary>
/// <param name="parameter"></param>
/// <returns></returns>
public bool CanExecute(object parameter = null)
{
try
{
return canExecute != null ? canExecute((TParameter)parameter) : executingCount == 0;
}
catch (Exception ex)
{
XLog.Trace(ex);
return true;
}
}
public event EventHandler CanExecuteChanged;
public void RaiseCanExecuteChanged()
{
CanExecuteChanged?.Invoke(this, EventArgs.Empty);
}
// Asynchronous command handling based on http://stackoverflow.com/a/31595509/6043538
public async void Execute(object parameterAsObject)
{
bool couldExecuteBeforeExecute = CanExecute(parameterAsObject);
if (!couldExecuteBeforeExecute) return;
Interlocked.Increment(ref executingCount);
bool couldExecuteDuringExecute = CanExecute(parameterAsObject);
if (couldExecuteDuringExecute != couldExecuteBeforeExecute) RaiseCanExecuteChanged(); // TODO: test if always raising canexecutechanged does not disturb normal UI element update during a short synchronous command. If so, keep preventing multiple execution but only raise CanExecuteChanged for asynchrounous commands
try
{
var parameter = (TParameter)parameterAsObject;
if (execute != null)
{
execute(parameter);
}
else
{
await asyncExecute(parameter);
}
}
catch (Exception ex)
{
XLog.Trace(ex);
}
finally
{
Interlocked.Decrement(ref executingCount);
bool couldExecuteAfterExecute = CanExecute(parameterAsObject);
if (couldExecuteAfterExecute != couldExecuteDuringExecute) RaiseCanExecuteChanged();
}
}
}
public class RelayCommandAsync<TParameter> : RelayCommand<TParameter>
{
// This ctor is public here and protected in the base class, to allow simple initialization like new RelayCommandAsync(MyMethod) without errors due to ambiguity
public RelayCommandAsync(Func<TParameter, Task> execute, Func<TParameter, bool> canExecute = null) : base(execute, canExecute) { }
}
}

Просмотреть файл

@ -0,0 +1,38 @@
using System;
namespace CSharpForMarkupDemos.Helpers
{
public class SingleSubscriptionEnsurer<T> where T : class
{
readonly Action<T> subscribe, unsubscribe;
T subscribedSender;
public SingleSubscriptionEnsurer(Action<T> subscribe, Action<T> unsubscribe)
{
this.subscribe = subscribe;
this.unsubscribe = unsubscribe;
}
public void EnsureSubscribed(T sender)
{
if (!object.ReferenceEquals(subscribedSender, sender))
{
EnsureUnsubscribed();
if (sender != null)
{
subscribe.Invoke(sender);
subscribedSender = sender;
}
}
}
public void EnsureUnsubscribed()
{
if (subscribedSender != null)
{
unsubscribe.Invoke(subscribedSender);
subscribedSender = null;
}
}
}
}

Просмотреть файл

@ -0,0 +1,59 @@
using System;
using System.Threading;
using System.Threading.Tasks;
namespace CSharpForMarkupDemos.Helpers
{
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
/// <summary>
/// Run synchronous and asychronous actions on the UI thread
/// Run synchronous and asychronous functions on the UI thread and return their result
/// Optimized: when already on the UI thread, executes directly without any scheduling.
/// Based on http://stackoverflow.com/questions/15428604/how-to-run-a-task-on-a-custom-taskscheduler-using-await
/// </summary>
public static class TaskHelper
{
static TaskScheduler uiTaskScheduler;
static TaskFactory uiTaskFactory;
/// <summary>
/// Call this method from the UI thread at application start, before you call RunOnUIThread
/// </summary>
public static void InitializeFromUIThread()
{
uiTaskScheduler = TaskScheduler.FromCurrentSynchronizationContext();
uiTaskFactory = new TaskFactory(CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskContinuationOptions.None, uiTaskScheduler);
}
public static Task RunOnUIThread(Func<Task> asyncAction) => uiTaskFactory.StartNew(asyncAction).Unwrap();
public static Task<T> RunOnUIThread<T>(Func<Task<T>> asyncFunction) => uiTaskFactory.StartNew(asyncFunction).Unwrap();
public static Task RunOnUIThread(Action action)
{
// If we are already on the UI thread, execute the action inline.
if (TaskScheduler.Current?.Id == uiTaskScheduler.Id) // We are already on the UI thread; excecute the action inline
{
action();
return Task.CompletedTask;
}
return uiTaskFactory.StartNew(action);
}
public static Task<T> RunOnUIThread<T>(Func<T> function)
{
// If we are already on the UI thread, execute the function inline.
if (TaskScheduler.Current?.Id == uiTaskScheduler.Id) // We are already on the UI thread; excecute the action inline
{
T result = function();
return Task.FromResult(result);
}
return uiTaskFactory.StartNew(function);
}
}
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
}

Просмотреть файл

@ -0,0 +1,145 @@
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Text;
#if WINDOWS_UWP
using Windows.Foundation.Diagnostics;
#endif
namespace CSharpForMarkupDemos.Helpers
{
/// <summary>
/// Cross-platform logging helper class for use in Xamarin apps.
/// </summary>
public static class XLog
{
static string rootFolderPattern = null;
#if WINDOWS_UWP
static LoggingChannel loggingChannel;
#endif
/// <summary>
/// Call this before logging starts.
/// </summary>
/// <param name="rootFolderPattern">Should match the top folder name(s) within the source control repository, e.g. @"\MobileRealtimePush\MobileRealtimePush\". Any folders before the first match of this pattern are omitted from the logged source file paths</param>
public static void Init(string rootFolderPattern = null)
{
XLog.rootFolderPattern = rootFolderPattern;
#if WINDOWS_UWP
loggingChannel = new LoggingChannel("XLog provider", null, new Guid("4bd2826e-54a1-4ba9-bf63-92b73ea1ac4a"));
#endif
}
/// <summary>
/// If the DEBUG constant is defined in a build, DebugLog logs to the debug output and to the native logging
/// mechanism of the mobile platform (NSLog on iOS or android.util.Log on Android).
///
/// String format: "[tag] memberName: data sourcefilePath:sourceLineNumber"
/// </summary>
/// <remarks>
/// In a release build both this method and any calls to it are compiled away.
/// </remarks>
/// <param name="data">object to log as ToString()</param>
/// <param name="tag">optional prefix</param>
/// <param name="memberName">supplied by compiler, no need to specify in code unless you want to pass a deeper call context</param>
/// <param name="sourceFilePath">supplied by compiler, no need to specify in code unless you want to pass a deeper call context</param>
/// <param name="sourceLineNumber">supplied by compiler, no need to specify in code unless you want to pass a deeper call context</param>
[Conditional("DEBUG")]
public static void Debug(
object data = null,
string tag = null,
[CallerMemberName] string memberName = null,
[CallerFilePath] string sourceFilePath = null,
[CallerLineNumber] int sourceLineNumber = -1)
{
string message = FormatLogString(data, tag, memberName, sourceFilePath, sourceLineNumber);
System.Diagnostics.Debug.WriteLine(message);
#if WINDOWS_UWP
loggingChannel?.LogMessage(message, LoggingLevel.Verbose); // For ETW logging through UWP Device Portal. Read more at https://blogs.windows.com/buildingapps/2016/06/10/using-device-portal-to-view-debug-logs-for-uwp/#1CvyvpPD4lUTtPzc.99
#endif
}
/// <summary>
/// If the TRACE constant is defined in a build, TraceLog logs to the trace output and to the native logging
/// mechanism of the mobile platform (NSLog on iOS or android.util.Log on Android).
///
/// String format: "[tag] memberName: data sourcefilePath:sourceLineNumber"
/// </summary>
/// <remarks>
/// If the TRACE constant is not defined in a build, both this method and any calls to it are compiled away.
/// </remarks>
/// <param name="data">object to log as ToString()</param>
/// <param name="tag">optional prefix</param>
/// <param name="memberName">supplied by compiler, no need to specify in code unless you want to pass a deeper call context</param>
/// <param name="sourceFilePath">supplied by compiler, no need to specify in code unless you want to pass a deeper call context</param>
/// <param name="sourceLineNumber">supplied by compiler, no need to specify in code unless you want to pass a deeper call context</param>
[Conditional("TRACE")]
public static void Trace(
object data = null,
string tag = null,
[CallerMemberName] string memberName = null,
[CallerFilePath] string sourceFilePath = null,
[CallerLineNumber] int sourceLineNumber = -1)
{
string message = FormatLogString(data, tag, memberName, sourceFilePath, sourceLineNumber);
#if WINDOWS_UWP
System.Diagnostics.Debug.WriteLine(message);
loggingChannel?.LogMessage(message, LoggingLevel.Information); // For ETW logging through UWP Device Portal. Read more at https://blogs.windows.com/buildingapps/2016/06/10/using-device-portal-to-view-debug-logs-for-uwp/#1CvyvpPD4lUTtPzc.99
#else
System.Diagnostics.Trace.WriteLine(message);
#endif
}
public static string TruncateAt(this string s, int maxLength, string truncatedSuffix = "...") => s?.Length <= maxLength ? s : s.Substring(0, maxLength) + truncatedSuffix;
static string FormatLogString(object data = null, string tag = null, string memberName = null, string sourceFilePath = null, int sourceLineNumber = -1)
{
StringBuilder line = new StringBuilder();
if (!string.IsNullOrEmpty(tag))
{
if (line.Length > 0) line.Append(' ');
line.Append('[');
line.Append(tag);
line.Append(']');
}
if (!string.IsNullOrEmpty(memberName))
{
if (line.Length > 0) line.Append(' ');
line.Append(memberName);
line.Append(':');
}
string dataString = data?.ToString();
if (!string.IsNullOrEmpty(dataString))
{
if (line.Length > 0) line.Append(' ');
line.Append(dataString);
}
if (!string.IsNullOrEmpty(sourceFilePath))
{
if (!string.IsNullOrEmpty(rootFolderPattern))
{
int rootFolderIndex = sourceFilePath.IndexOf(rootFolderPattern);
if (rootFolderIndex >= 0) sourceFilePath = sourceFilePath.Substring(rootFolderIndex);
}
if (line.Length > 0) line.Append(' ');
line.Append("at ");
line.Append(sourceFilePath);
if (sourceLineNumber >= 0)
{
line.Append(":");
line.Append(sourceLineNumber);
}
}
return line.ToString();
}
}
}

Просмотреть файл

@ -0,0 +1,45 @@
using Xamarin.Forms.Markup;
using Xamarin.Forms;
namespace CSharpForMarkupDemos
{
public static class Styles
{
static Style<Button> buttons, filledButton;
static Style<Label> labels;
static Style<Span> link;
#region Implicit styles
public static ResourceDictionary Implicit => new ResourceDictionary { Buttons, Labels };
public static Style<Button> Buttons => buttons ?? (buttons = new Style<Button>(
(Button.HeightRequestProperty, 44),
(Button.FontSizeProperty, 13),
(Button.HorizontalOptionsProperty, LayoutOptions.Center),
(Button.VerticalOptionsProperty, LayoutOptions.Center)
));
public static Style<Label> Labels => labels ?? (labels = new Style<Label>(
(Label.FontSizeProperty, 13),
(Label.TextColorProperty, Color.Black)
));
#endregion Implicit styles
#region Explicit styles
public static Style<Button> FilledButton => filledButton ?? (filledButton = new Style<Button>(
(Button.TextColorProperty, Color.White),
(Button.BackgroundColorProperty, Color.FromHex("#1976D2")),
(Button.CornerRadiusProperty, 5)
)).BasedOn(Buttons);
public static Style<Span> Link => link ?? (link = new Style<Span>(
(Span.TextColorProperty, Color.Blue),
(Span.TextDecorationsProperty, TextDecorations.Underline)
));
#endregion Explicit styles
}
}

Просмотреть файл

@ -0,0 +1,72 @@
using System.ComponentModel;
using CSharpForMarkupDemos.Helpers;
namespace CSharpForMarkupDemos.ViewModels
{
public abstract class BaseViewModel : INotifyPropertyChanged
{
/// <summary>
/// Check this property when you receive events from outside the viewmodel, e.g. from services.
/// If IsShowing is true then it is a good time to update data-bound properties;
/// if IsShowing is false then you could set a dirty flag, so later in OnShow() you can retrieve
/// changed data and update any changed data-bound properties.
/// </summary>
public bool IsShowing { get; private set; }
/// <summary>
/// This method is called when a view becomes visible.
/// You can override this method to update
/// data-bound properties for any changes that originated from outside the viewmodel,
/// e.g. changes in service model objects that you were notified about in service events that you
/// subscribed to in the viewmodel.
///
/// Always call base.OnShow() at the start of your method when you override it!
///
/// The view base classes call this method on the following view lifecycle events:
/// iOS: TODO
/// Android: TODO
/// Windows: OnNavigatedTo
/// </summary>
public virtual void OnShow()
{
IsShowing = true;
}
/// <summary>
/// This method is called when a view becomes invisible.
/// You can override this method to handle any tasks that do not belong in OnUserInteractionStopped().
///
/// Always call base.OnHide() at the end of your method when you override it!
///
/// The view base classes call this method on the following view lifecycle events:
/// iOS: TODO
/// Android: TODO
/// Windows: OnNavigatingFrom
/// </summary>
public virtual void OnHide()
{
IsShowing = false;
OnUserInteractionStopped();
}
/// <summary>
/// This method is called when the user is done interacting with the viewmodel.
/// <example>E.g. override this method to save changes in the viewmodel without the need for a save button.</example>
/// <remarks>The standard QuickCross implementation will call this method from lifecycle events,
/// such as when the app is stopped or when navigating away from a view.
/// You could also call this method on other moments, e.g. when the user is inactive for a number of seconds.</remarks>
/// </summary>
public virtual void OnUserInteractionStopped() { }
#region INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void RaisePropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
TaskHelper.RunOnUIThread(() => handler(this, new PropertyChangedEventArgs(propertyName)));
}
#endregion
}
}

Просмотреть файл

@ -0,0 +1,34 @@
using System.Threading.Tasks;
using System.Windows.Input;
using CSharpForMarkupDemos.Helpers;
namespace CSharpForMarkupDemos.ViewModels
{
public class MainViewModel : BaseViewModel
{
readonly App app;
ICommand continueToRegistrationCommand;
ICommand continueToNestedListCommand;
ICommand continueToCSharpForMarkupCommand;
ICommand continueToAnimatedPageCommand;
public string Title => "Xamarin.Forms C# Markup";
public string SubTitle => "Demos";
public ICommand ContinueToRegistrationCommand => continueToRegistrationCommand ?? (continueToRegistrationCommand = new RelayCommandAsync(ContinueToRegistration));
public ICommand ContinueToNestedListCommand => continueToNestedListCommand ?? (continueToNestedListCommand = new RelayCommandAsync(ContinueToNestedList));
public ICommand ContinueToAnimatedPageCommand => continueToAnimatedPageCommand ?? (continueToAnimatedPageCommand = new RelayCommandAsync(ContinueToAnimatedPage));
public ICommand ContinueToCSharpForMarkupCommand => continueToCSharpForMarkupCommand ?? (continueToCSharpForMarkupCommand = new RelayCommandAsync(ContinueToCSharpForMarkup));
public MainViewModel(App app)
{
this.app = app;
}
Task ContinueToRegistration() => app.ContinueToRegistration();
Task ContinueToNestedList() => app.ContinueToNestedList();
Task ContinueToAnimatedPage() => app.ContinueToAnimatedPage();
Task ContinueToCSharpForMarkup() => app.OpenUri("https://docs.microsoft.com/xamarin/xamarin-forms/user-interface/csharp-markup");
}
}

Просмотреть файл

@ -0,0 +1,110 @@
using System.Threading.Tasks;
using System.Windows.Input;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using CSharpForMarkupDemos.Helpers;
namespace CSharpForMarkupDemos.ViewModels
{
public class NestedListViewModel : BaseViewModel
{
readonly App app;
ICommand addGroupCommand;
ICommand removeGroupCommand;
ICommand removeItemCommand;
ICommand returnToPreviousViewCommand;
public string Title { get; set; } = "Xamarin.Forms C# Markup";
public string Subtitle { get; set; } = "Nested List";
public ObservableCollection<ListGroup> Groups { get; set; } = new ObservableCollection<ListGroup>();
public ICommand AddGroupCommand => addGroupCommand ?? (addGroupCommand = new RelayCommand(AddGroup));
public ICommand RemoveGroupCommand => removeGroupCommand ?? (removeGroupCommand = new RelayCommand<ListGroup>(RemoveGroup));
public ICommand RemoveItemCommand => removeItemCommand ?? (removeItemCommand = new RelayCommand<ListItem>(RemoveItem));
public ICommand ReturnToPreviousViewCommand => returnToPreviousViewCommand ?? (returnToPreviousViewCommand = new RelayCommandAsync(ReturnToPreviousView));
public NestedListViewModel(App app)
{
this.app = app;
AddGroup();
}
void AddGroup() => Groups.Add(new ListGroup { Title = $"Group { Groups.Count + 1 }" });
void RemoveGroup(ListGroup group) => Groups.Remove(group);
void RemoveItem(ListItem item)
{
if (item.IsDummy) return;
var group = Groups.FirstOrDefault(g => g.Contains(item));
if (group == null) return;
group.Remove(item); group.Update();
}
Task ReturnToPreviousView() => app.ReturnToPreviousView();
}
public class ListGroup : ObservableCollection<ListItem>
{
ICommand addItemCommand;
public ListGroup() { Items.Add(new ListItem { IsDummy = true }); }
public ListGroup(IEnumerable<ListItem> items) : base(items) { }
public string Title { get; set; }
public bool IsOdd { get; set; }
public new ObservableCollection<ListItem> Items => this;
public ICommand AddItemCommand => addItemCommand ?? (addItemCommand = new RelayCommand(AddItem));
public void Update() => IsOdd = (Items.Count - 1) % 2 == 1;
void AddItem() { Items.Add(new ListItem { Title = Items.Count.ToString() }); Update(); }
}
public class ListItem : BaseViewModel
{
ICommand increaseCountCommand, decreaseCountCommand;
public bool IsDummy { get; set; }
public string Title { get; set; }
public int Count { get; set; }
public string CountText => Pile('\u2b50', Count);
public ICommand IncreaseCountCommand => increaseCountCommand ?? (increaseCountCommand = new RelayCommand(IncreaseCount, () => Count < 15));
public ICommand DecreaseCountCommand => decreaseCountCommand ?? (decreaseCountCommand = new RelayCommand(DecreaseCount, () => Count > 0));
void IncreaseCount() => Count++;
void DecreaseCount() => Count--;
string Pile(char c, int count)
{
List<string> lines = new List<string>();
for (int lineLength = 1; count >= lineLength; lineLength++)
{
lines.Add(new string(c, lineLength));
count -= lineLength;
}
while (count > 0)
{
lines[lines.Count - count] = lines[lines.Count - count] + c;
count--;
}
return string.Join("\n", lines.ToArray());
}
}
}

Просмотреть файл

@ -0,0 +1,57 @@
using System.Threading.Tasks;
using System.Windows.Input;
using System.Text.RegularExpressions;
using CSharpForMarkupDemos.Helpers;
namespace CSharpForMarkupDemos.ViewModels
{
public class RegistrationCodeViewModel : BaseViewModel
{
readonly App app;
string registrationCode;
ICommand verifyRegistrationCodeCommand;
ICommand returnToPreviousViewCommand;
public string RegistrationTitle => "Xamarin.Forms C# Markup";
public string RegistrationSubTitle => "Registration code demo";
public string RegistrationPrompt { get; set; } = "Your test registration code is 123456.\n\nPlease enter it below";
public string RegistrationCode
{
get { return registrationCode; }
set
{
registrationCode = value;
if (Regex.IsMatch(registrationCode, @"^\d{6}$"))
{
IsRegistrationCodeFormatValid = true;
RegistrationCodeValidationMessage = null;
}
else
{
IsRegistrationCodeFormatValid = false;
RegistrationCodeValidationMessage = "6 digits";
}
}
}
public bool IsRegistrationCodeFormatValid { get; set; }
public bool CanVerifyRegistrationCode => IsRegistrationCodeFormatValid;
public string RegistrationCodeValidationMessage { get; set; }
public ICommand VerifyRegistrationCodeCommand { get { return verifyRegistrationCodeCommand ?? (verifyRegistrationCodeCommand = new RelayCommandAsync(SaveRegistrationCode)); } }
public ICommand ReturnToPreviousViewCommand => returnToPreviousViewCommand ?? (returnToPreviousViewCommand = new RelayCommandAsync(ReturnToPreviousView));
public RegistrationCodeViewModel(App app)
{
this.app = app;
}
Task SaveRegistrationCode() => app.DisplayAlert("Registration", $"Registered code { RegistrationCode }");
Task ReturnToPreviousView() => app.ReturnToPreviousView();
}
}

Просмотреть файл

@ -0,0 +1,38 @@
using Xamarin.Forms;
using Xamarin.Forms.Markup;
namespace CSharpForMarkupDemos.Views
{
partial class AnimatedPage : BaseContentPage
{
void Build()
{
Title = "Animated page demo";
Content = new StackLayout
{
IsVisible = false,
Children =
{
new StyledLabel ("Animation example"),
new StyledLabel ("to illustrate"),
new StyledLabel ("separation"),
new StyledLabel ("of"),
new StyledLabel ("UI Markup") { TextColor = Color.Green } .Bold (),
new StyledLabel ("and"),
new StyledLabel ("UI Logic") { TextColor = Color.Red } .Bold ()
}
} .Assign (out animatedStackLayout);
}
class StyledLabel : Label
{
public StyledLabel(string text)
{
Text = text;
this .FontSize (32)
.CenterHorizontal ();
}
}
}
}

Просмотреть файл

@ -0,0 +1,19 @@
using Xamarin.Forms;
using CSharpForMarkupDemos.Helpers;
namespace CSharpForMarkupDemos.Views
{
partial class AnimatedPage
{
StackLayout animatedStackLayout;
public AnimatedPage() => Build();
protected override void OnAppearing()
{
base.OnAppearing();
Content.IsVisible = true;
animatedStackLayout.Children.StaggerIn(50, 0.5);
}
}
}

Просмотреть файл

@ -0,0 +1,50 @@
using System;
using CSharpForMarkupDemos.Helpers;
using CSharpForMarkupDemos.ViewModels;
using Xamarin.Forms;
namespace CSharpForMarkupDemos.Views
{
public class BaseContentPage : ContentPage
{
protected static double PageMarginSize = 12;
protected static double HeaderHeight = 26;
protected static double CellHorizontalMarginSize = 16;
protected static double CellVerticalMarginSize = 12;
}
public class BaseContentPage<ViewModelType> : BaseContentPage where ViewModelType : BaseViewModel
{
protected ViewModelType ViewModel
{
get { return (ViewModelType)BindingContext; }
set { BindingContext = value; }
}
protected override void OnAppearing()
{
try
{
base.OnAppearing();
ViewModel?.OnShow();
}
catch (Exception ex)
{
XLog.Trace(ex);
}
}
protected override void OnDisappearing()
{
try
{
ViewModel?.OnHide();
base.OnDisappearing();
}
catch (Exception ex)
{
XLog.Trace(ex);
}
}
}
}

Просмотреть файл

@ -0,0 +1,72 @@
using CSharpForMarkupDemos.Controls;
using CSharpForMarkupDemos.ViewModels;
using Xamarin.Forms;
using Xamarin.Forms.Markup;
using static CSharpForMarkupDemos.Styles;
using static Xamarin.Forms.Markup.GridRowsColumns;
namespace CSharpForMarkupDemos.Views
{
class MainPage : BaseContentPage<MainViewModel>
{
public MainPage() => Build();
enum PageRow
{
Header,
Body
}
void Build()
{
var app = App.Current;
var vm = ViewModel = app.MainViewModel;
NavigationPage.SetHasNavigationBar(this, false);
BackgroundColor = Color.AliceBlue;
Content = new Grid
{
RowSpacing = 0,
RowDefinitions = Rows.Define((PageRow.Header, Auto), (PageRow.Body, Star)),
Children =
{
PageHeader.Create (PageMarginSize, nameof(vm.Title), nameof(vm.SubTitle))
.Row (PageRow.Header),
new ScrollView
{
Content = new StackLayout
{
Children =
{
new NavigateButton ("Registration code demo", nameof(vm.ContinueToRegistrationCommand)),
new NavigateButton ("Nested list demo", nameof(vm.ContinueToNestedListCommand)),
new NavigateButton ("Animated page demo", nameof(vm.ContinueToAnimatedPageCommand)),
new Label { }
.FormattedText (
new Span { Text = "For more information about C# Markup, see " },
new Span { Text = "C# Markup", Style = Link }
.BindTapGesture (nameof(vm.ContinueToCSharpForMarkupCommand)),
new Span { Text = "." })
.CenterHorizontal ()
}
} .Margin (10)
} .Row (PageRow.Body)
}
};
}
class NavigateButton : Button
{
public NavigateButton(string text, string command)
{
Text = text;
this .Style (FilledButton)
.FillExpandHorizontal () .Margin (PageMarginSize)
.Bind (command);
}
}
}
}

Просмотреть файл

@ -0,0 +1,211 @@
using Xamarin.Forms;
using Xamarin.Forms.Markup;
using Xamarin.Forms.Markup.LeftToRight;
using static Xamarin.Forms.Markup.GridRowsColumns;
using CSharpForMarkupDemos.ViewModels;
using CSharpForMarkupDemos.Controls;
namespace CSharpForMarkupDemos.Views
{
public partial class NestedListPage : BaseContentPage<NestedListViewModel>
{
enum PageRow
{
Header,
Body
}
enum GroupRow
{
Body,
Separator
}
void Build()
{
var app = App.Current;
var vm = ViewModel = app.NestedListViewModel;
NavigationPage.SetHasNavigationBar(this, false);
BackgroundColor = Color.AliceBlue;
Content = new Grid
{
RowSpacing = 0,
RowDefinitions = Rows.Define(
(PageRow.Header, Auto),
(PageRow.Body, Star)
),
Children =
{
PageHeader.Create(PageMarginSize, nameof(vm.Title), nameof(vm.Subtitle), nameof(vm.ReturnToPreviousViewCommand))
.Row (PageRow.Header),
new ListView(ListViewCachingStrategy.RecycleElement)
{
IsGroupingEnabled = true,
HasUnevenRows = true,
BackgroundColor = Color.White,
SeparatorColor = Color.White,
GroupHeaderTemplate = new DataTemplate(() => new ViewCell
{
Height = 40,
View = new Grid
{
BackgroundColor = Color.White,
RowSpacing = 0,
RowDefinitions = Rows.Define((GroupRow.Body, Star), (GroupRow.Separator, 2)),
Children =
{
new StackLayout
{
Orientation = StackOrientation.Horizontal,
Spacing = 5,
Children =
{
new Label { TextColor = Color.Black } .Font (15) .Bold ()
.Margins (left: PageMarginSize) .LeftExpand () .CenterVertical ()
.Bind (nameof(ListGroup.Title)),
new Frame { CornerRadius = 4, HasShadow = false, BackgroundColor = Color.FromHex("#1976D2"),
Content = new Label { Text = "Odd", TextColor = Color.White } }
.CenterVertical () .Margins (right: 10) .Padding (9, 3)
.Bind (Frame.IsVisibleProperty, nameof(ListGroup.IsOdd)),
new Button { Text = " Add Item " }
.CenterVertical ()
.Bind (nameof(ListGroup.AddItemCommand)),
new Button { Text = " Remove Group " }
.CenterVertical () .Margins (right: PageMarginSize)
.BindCommand (nameof(vm.RemoveGroupCommand), source: vm)
}
} .Row (GroupRow.Body),
new BoxView { Color = Color.SlateGray }
.Row (GroupRow.Separator)
}
}
}),
ItemTemplate = new ListItemSelector(vm),
Footer = new Button { Text = " Add Group " }
.Bind (nameof(vm.AddGroupCommand)),
}.Row (PageRow.Body)
.Invoke (l => l.ItemSelected += List_ItemSelected)
.Bind (nameof(vm.Groups))
}
};
}
partial class ListItemSelector : DataTemplateSelector
{
enum Row
{
Header,
Separator,
Piles,
Buttons,
Last = Buttons
}
enum Col
{
LeftPileIcon,
LeftPile,
PileSeparator,
RightPileIcon,
RightPile,
Nr,
Last = Nr
}
public ListItemSelector(NestedListViewModel vm)
{
template = new DataTemplate(() => new ViewCell
{
View = new StackLayout
{
Spacing = 0,
Children =
{
new Grid
{
Margin = new Thickness(PageMarginSize, 6, PageMarginSize, 0),
BackgroundColor = Color.White,
RowDefinitions = Rows.Define(
(Row.Header , Auto),
(Row.Separator, 10),
(Row.Piles , Auto),
(Row.Buttons , Auto)
),
ColumnDefinitions = Columns.Define(
(Col.LeftPileIcon , 24),
(Col.LeftPile , Star),
(Col.PileSeparator, 11),
(Col.RightPileIcon, 24),
(Col.RightPile , Star),
(Col.Nr , 55)
),
Children =
{
new Label { Text = "\u2b50 ", TextColor = Color.Green }
.Row (Row.Header) .Column (Col.LeftPileIcon) .Left () .CenterVertical (),
new Label { Text = "Item", LineBreakMode = LineBreakMode.TailTruncation } .Font (15) .Bold ()
.Row (Row.Header) .Column (Col.LeftPile, Col.Last) .CenterVertical (),
new Label { TextColor = Color.Black } .Bold ()
.Row (Row.Header) .Column (Col.Nr) .Center ()
.Bind (nameof(ListItem.Title)),
new Label { Text = "\U0001f60e " }
.Row (Row.Piles) .Column (Col.LeftPileIcon) .Left () .CenterVertical (),
new Label { } .Font (14) .Bold ()
.Row (Row.Piles) .Column (Col.LeftPile) .CenterVertical () .TextCenterHorizontal () .TextBottom ()
.Bind (nameof(ListItem.CountText)),
new BoxView { Color = Color.DarkBlue }
.Row (Row.Piles, Row.Buttons) .Column (Col.PileSeparator) .CenterHorizontal () .Bottom () .Size (2, 30) .Margins (bottom: 3),
new Label { Text = "\U0001f60e " }
.Row (Row.Piles) .Column (Col.RightPileIcon) .Left () .CenterVertical (),
new Label { } .Font (14) .Bold ()
.Row (Row.Piles) .Column (Col.RightPile) .CenterVertical () .TextCenterHorizontal () .TextBottom ()
.Bind (nameof(ListItem.CountText)),
new Button { Text = "-", TextColor = Color.White, BackgroundColor = Color.FromHex("#1976D2")} .Font (14)
.Row (Row.Buttons) .Column (Col.LeftPileIcon, Col.LeftPile) .FillHorizontal () .CenterVertical ()
.Invoke (b => b.Clicked += DecreaseCount),
new Button { Text = "+", TextColor = Color.White, BackgroundColor = Color.FromHex("#1976D2") } .Font (14)
.Row (Row.Buttons) .Column (Col.RightPileIcon, Col.RightPile) .FillHorizontal () .CenterVertical ()
.Invoke (b => b.Clicked += IncreaseCount),
}
} .Padding (CellHorizontalMarginSize, CellVerticalMarginSize),
new BoxView { }
.FillExpandHorizontal () .Height (3) .Margins (PageMarginSize, 0, PageMarginSize, 6)
.Bind (nameof(ListItem.Count), convert: (int count) => count % 2 == 1 ? Color.Green : Color.Red),
new Button { Text = " Remove item " }
.BindCommand (nameof(vm.RemoveItemCommand), source: vm)
}
}
});
emptyTemplate = new DataTemplate(() => new ViewCell { Height = 0.1, View = new ContentView { HeightRequest = 0.1, IsVisible = false } });
}
}
}
}

Просмотреть файл

@ -0,0 +1,47 @@
using System;
using Xamarin.Forms;
using CSharpForMarkupDemos.ViewModels;
namespace CSharpForMarkupDemos.Views
{
public partial class NestedListPage : BaseContentPage<NestedListViewModel>
{
public NestedListPage() => Build();
void List_ItemSelected(object sender, SelectedItemChangedEventArgs e) => ((ListView)sender).SelectedItem = null; // Prevent item selection
partial class ListItemSelector : DataTemplateSelector
{
readonly DataTemplate template, emptyTemplate;
protected override DataTemplate OnSelectTemplate(object item, BindableObject container) => item is ListItem listItem && !listItem.IsDummy ? template : emptyTemplate;
void DecreaseCount(object sender, EventArgs args)
{
var button = (Button)sender;
var listItem = (ListItem)button.BindingContext;
listItem.DecreaseCountCommand.Execute(null);
ForceUpdateContainingCellSize(button);
}
void IncreaseCount(object sender, EventArgs args)
{
var button = (Button)sender;
var listItem = (ListItem)button.BindingContext;
listItem.IncreaseCountCommand.Execute(null);
ForceUpdateContainingCellSize(button);
}
void ForceUpdateContainingCellSize(Element element)
{
for (var parent = element?.Parent; parent != null; parent = parent.Parent)
{
if (parent is ViewCell viewCell) { viewCell.ForceUpdateSize(); break; }
}
}
}
}
}

Просмотреть файл

@ -0,0 +1,104 @@
using CSharpForMarkupDemos.Controls;
using CSharpForMarkupDemos.ViewModels;
using Xamarin.Forms;
using Xamarin.Forms.Markup;
using Xamarin.Forms.Markup.LeftToRight;
using static CSharpForMarkupDemos.Styles;
using static Xamarin.Forms.Markup.GridRowsColumns;
namespace CSharpForMarkupDemos.Views
{
public class RegistrationCodePage : BaseContentPage<RegistrationCodeViewModel>
{
public RegistrationCodePage() => Build();
enum PageRow
{
Header,
Body
}
enum BodyRow
{
Prompt,
CodeHeader,
CodeEntry,
Button
}
enum BodyCol
{
FieldLabel,
FieldValidation
}
void Build()
{
var app = App.Current;
var vm = ViewModel = app.RegistrationCodeViewModel;
var fieldNameMargin = new Thickness(20, 10);
var fieldMargin = new Thickness(PageMarginSize, 0);
NavigationPage.SetHasNavigationBar(this, false);
BackgroundColor = Color.AliceBlue;
Content = new Grid
{
RowSpacing = 0,
RowDefinitions = Rows.Define((PageRow.Header, Auto), (PageRow.Body, Star)),
Children =
{
PageHeader.Create(
PageMarginSize,
nameof(vm.RegistrationTitle), nameof(vm.RegistrationSubTitle),
returnToPreviousViewCommandPropertyName: nameof(vm.ReturnToPreviousViewCommand),
centerTitle:true
) .Row (PageRow.Header),
new ScrollView
{
Content = new Grid
{
RowSpacing = 0,
RowDefinitions = Rows.Define(
(BodyRow.Prompt , 170 ),
(BodyRow.CodeHeader, 75 ),
(BodyRow.CodeEntry , Auto),
(BodyRow.Button , Auto)
),
ColumnDefinitions = Columns.Define(
(BodyCol.FieldLabel , 160 ),
(BodyCol.FieldValidation, Star)
),
Children =
{
new Label { LineBreakMode = LineBreakMode.WordWrap } .Font (15) .Bold ()
.Row (BodyRow.Prompt) .ColumnSpan (All<BodyCol>()) .FillExpandHorizontal () .CenterVertical () .Margin (fieldNameMargin) .TextCenterHorizontal ()
.Bind (nameof(vm.RegistrationPrompt)),
new Label { Text = "Registration code" } .Bold ()
.Row (BodyRow.CodeHeader) .Column(BodyCol.FieldLabel) .Bottom () .Margin (fieldNameMargin),
new Label { } .Italic ()
.Row (BodyRow.CodeHeader) .Column (BodyCol.FieldValidation) .Right () .Bottom () .Margin (fieldNameMargin)
.Bind (nameof(vm.RegistrationCodeValidationMessage)),
new Entry { Placeholder = "E.g. 123456", Keyboard = Keyboard.Numeric, BackgroundColor = Color.AliceBlue, TextColor = Color.Black } .Font (15)
.Row (BodyRow.CodeEntry) .ColumnSpan (All<BodyCol>()) .Margin (fieldMargin) .Height (44)
.Bind (nameof(vm.RegistrationCode), BindingMode.TwoWay),
new Button { Text = "Verify" } .Style (FilledButton)
.Row (BodyRow.Button) .ColumnSpan (All<BodyCol>()) .FillExpandHorizontal () .Margin (PageMarginSize)
.Bind (Button.IsVisibleProperty, nameof(vm.CanVerifyRegistrationCode))
.Bind (nameof(vm.VerifyRegistrationCodeCommand)),
}
}
} .Row (PageRow.Body)
}
};
}
}
}

Просмотреть файл

@ -0,0 +1,20 @@
---
name: Xamarin.Forms - C# markup
description: "This sample demonstrates how to use C# markup to simplify the process of building declarative Xamarin.Forms user interfaces in C#."
page_type: sample
languages:
- csharp
products:
- xamarin
extensions:
tags:
- ui
urlFragment: userinterface-csharpmarkupdemos
---
# C# markup
This sample demonstrates how to use C# markup to simplify the process of building declarative Xamarin.Forms user interfaces in C#.
For more information about this sample, see [Xamarin.Forms C# markup](https://docs.microsoft.com/xamarin/xamarin-forms/user-interface/csharp-markup).
![C# markup application screenshot](Screenshots/01All.png "C# markup UI")

Двоичные данные
Docs/CSharpMarkupDemos/Screenshots/01All.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 129 KiB

Двоичные данные
Docs/CSharpMarkupDemos/Screenshots/02All.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 131 KiB

Просмотреть файл

@ -0,0 +1,315 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28917.181
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChatServer", "ChatServer\ChatServer.csproj", "{908868D1-CD1D-4CD5-816F-B6CB76085BF8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatClient.Android", "ChatClient.Android\ChatClient.Android.csproj", "{235066C3-8438-4C5E-BF69-F4735D6C134D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatClient.iOS", "ChatClient.iOS\ChatClient.iOS.csproj", "{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChatClient.UWP", "ChatClient.UWP\ChatClient.UWP.csproj", "{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChatClient", "ChatClient\ChatClient.csproj", "{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
Ad-Hoc|ARM = Ad-Hoc|ARM
Ad-Hoc|iPhone = Ad-Hoc|iPhone
Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
Ad-Hoc|x64 = Ad-Hoc|x64
Ad-Hoc|x86 = Ad-Hoc|x86
AppStore|Any CPU = AppStore|Any CPU
AppStore|ARM = AppStore|ARM
AppStore|iPhone = AppStore|iPhone
AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
AppStore|x64 = AppStore|x64
AppStore|x86 = AppStore|x86
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|iPhone = Debug|iPhone
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|x64.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Ad-Hoc|x86.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|Any CPU.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|ARM.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|ARM.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|iPhone.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|x64.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|x64.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|x86.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.AppStore|x86.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|ARM.ActiveCfg = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|ARM.Build.0 = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|iPhone.Build.0 = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|x64.ActiveCfg = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|x64.Build.0 = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|x86.ActiveCfg = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Debug|x86.Build.0 = Debug|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|Any CPU.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|ARM.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|ARM.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|iPhone.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|iPhone.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|x64.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|x64.Build.0 = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|x86.ActiveCfg = Release|Any CPU
{908868D1-CD1D-4CD5-816F-B6CB76085BF8}.Release|x86.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|x64.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|x64.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|x86.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|Any CPU.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|ARM.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|ARM.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|ARM.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|iPhone.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|iPhone.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|x64.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|x64.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|x64.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|x86.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|x86.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.AppStore|x86.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|ARM.ActiveCfg = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|ARM.Build.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|ARM.Deploy.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|iPhone.Build.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|iPhone.Deploy.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|x64.ActiveCfg = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|x64.Build.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|x64.Deploy.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|x86.ActiveCfg = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|x86.Build.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Debug|x86.Deploy.0 = Debug|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|Any CPU.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|Any CPU.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|ARM.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|ARM.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|ARM.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|iPhone.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|iPhone.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|iPhone.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|x64.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|x64.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|x64.Deploy.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|x86.ActiveCfg = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|x86.Build.0 = Release|Any CPU
{235066C3-8438-4C5E-BF69-F4735D6C134D}.Release|x86.Deploy.0 = Release|Any CPU
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Ad-Hoc|x64.ActiveCfg = Ad-Hoc|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.AppStore|ARM.ActiveCfg = AppStore|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.AppStore|iPhone.Build.0 = AppStore|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.AppStore|x64.ActiveCfg = AppStore|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.AppStore|x86.ActiveCfg = AppStore|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Debug|Any CPU.ActiveCfg = Debug|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Debug|ARM.ActiveCfg = Debug|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Debug|iPhone.ActiveCfg = Debug|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Debug|iPhone.Build.0 = Debug|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Debug|x64.ActiveCfg = Debug|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Debug|x86.ActiveCfg = Debug|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Debug|x86.Build.0 = Debug|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Debug|x86.Deploy.0 = Debug|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Release|Any CPU.ActiveCfg = Release|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Release|ARM.ActiveCfg = Release|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Release|iPhone.ActiveCfg = Release|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Release|iPhone.Build.0 = Release|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Release|x64.ActiveCfg = Release|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Release|x86.ActiveCfg = Release|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Release|x86.Build.0 = Release|iPhone
{0C4F66D7-75F4-4FE0-AFC1-8605FD3DA4DF}.Release|x86.Deploy.0 = Release|iPhone
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|Any CPU.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|Any CPU.Build.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|Any CPU.Deploy.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|ARM.ActiveCfg = Release|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|ARM.Build.0 = Release|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|ARM.Deploy.0 = Release|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|iPhone.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|iPhone.Build.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|iPhone.Deploy.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|x64.ActiveCfg = Release|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|x64.Build.0 = Release|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|x64.Deploy.0 = Release|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|x86.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|x86.Build.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Ad-Hoc|x86.Deploy.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|Any CPU.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|Any CPU.Build.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|Any CPU.Deploy.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|ARM.ActiveCfg = Release|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|ARM.Build.0 = Release|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|ARM.Deploy.0 = Release|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|iPhone.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|iPhone.Build.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|iPhone.Deploy.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|iPhoneSimulator.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|iPhoneSimulator.Build.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|iPhoneSimulator.Deploy.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|x64.ActiveCfg = Release|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|x64.Build.0 = Release|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|x64.Deploy.0 = Release|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|x86.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|x86.Build.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.AppStore|x86.Deploy.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|Any CPU.ActiveCfg = Debug|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|ARM.ActiveCfg = Debug|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|ARM.Build.0 = Debug|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|ARM.Deploy.0 = Debug|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|iPhone.ActiveCfg = Debug|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|x64.ActiveCfg = Debug|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|x64.Build.0 = Debug|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|x64.Deploy.0 = Debug|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|x86.ActiveCfg = Debug|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|x86.Build.0 = Debug|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Debug|x86.Deploy.0 = Debug|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|Any CPU.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|ARM.ActiveCfg = Release|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|ARM.Build.0 = Release|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|ARM.Deploy.0 = Release|ARM
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|iPhone.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|iPhoneSimulator.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|x64.ActiveCfg = Release|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|x64.Build.0 = Release|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|x64.Deploy.0 = Release|x64
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|x86.ActiveCfg = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|x86.Build.0 = Release|x86
{1DB2895B-FED2-4944-8E1B-0C494FBCA4C3}.Release|x86.Deploy.0 = Release|x86
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|ARM.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|ARM.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|iPhone.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|x64.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|x64.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|x86.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.AppStore|x86.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|ARM.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|ARM.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|iPhone.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|x64.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|x64.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|x86.ActiveCfg = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Debug|x86.Build.0 = Debug|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|Any CPU.Build.0 = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|ARM.ActiveCfg = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|ARM.Build.0 = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|iPhone.ActiveCfg = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|iPhone.Build.0 = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|x64.ActiveCfg = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|x64.Build.0 = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|x86.ActiveCfg = Release|Any CPU
{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3C0AEC4A-3ED9-4820-8D2D-960DD789163A}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,19 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with you package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

Просмотреть файл

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{235066C3-8438-4C5E-BF69-F4735D6C134D}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{c9e5eea5-ca05-42a1-839b-61506e0a37df}</TemplateGuid>
<OutputType>Library</OutputType>
<RootNamespace>ChatClient.Droid</RootNamespace>
<AssemblyName>ChatClient.Android</AssemblyName>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.2</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1687" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
<None Include="Assets\AboutAssets.txt" />
<None Include="Properties\AndroidManifest.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.axml" />
<AndroidResource Include="Resources\layout\Toolbar.axml" />
<AndroidResource Include="Resources\values\styles.xml" />
<AndroidResource Include="Resources\values\colors.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon.xml" />
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon_round.xml" />
<AndroidResource Include="Resources\mipmap-hdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-hdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-mdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-mdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable-hdpi\" />
<Folder Include="Resources\drawable-xhdpi\" />
<Folder Include="Resources\drawable-xxhdpi\" />
<Folder Include="Resources\drawable-xxxhdpi\" />
<Folder Include="Resources\drawable\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ChatClient\ChatClient.csproj">
<Project>{2ABF0D0F-7808-4A36-9AF1-4A07C573EC47}</Project>
<Name>ChatClient</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

Просмотреть файл

@ -0,0 +1,20 @@
using Android.App;
using Android.Content.PM;
using Android.OS;
namespace ChatClient.Droid
{
[Activity(Label = "ChatClient", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
}
}
}

Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.xamarin.azuresignalr">
<uses-sdk android:minSdkVersion="21" />
<application android:label="ChatClient.Android"></application>
</manifest>

Просмотреть файл

@ -0,0 +1,34 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ChatClient.Android")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ChatClient.Android")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
// Add some common permissions, these can be removed if not needed
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]

Просмотреть файл

@ -0,0 +1,50 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.xml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable-hdpi/
icon.png
drawable-ldpi/
icon.png
drawable-mdpi/
icon.png
layout/
main.xml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called
"Resource" that contains the tokens for each one of the resources included. For example,
for the above Resources layout, this is what the Resource class would expose:
public class Resource {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

18368
Docs/SignalR/AzureSignalR/ChatClient.Android/Resources/Resource.designer.cs сгенерированный Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:tabIndicatorColor="@android:color/white"
app:tabGravity="fill"
app:tabMode="fixed" />

Просмотреть файл

@ -0,0 +1,9 @@
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:popupTheme="@style/ThemeOverlay.AppCompat.Light" />

Просмотреть файл

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/launcher_background" />
<foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше