using System.Xml;
using System.Diagnostics;
using System.IO;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Platform.Tizen
{
catch (Exception e)
{
Debug.WriteLine("Could not deserialize properties: " + e.Message);
- Xamarin.Forms.Log.Warning("Xamarin.Forms PropertyStore", $"Exception while reading Application properties: {e}");
+ Internals.Log.Warning("Xamarin.Forms PropertyStore", $"Exception while reading Application properties: {e}");
}
finally
{
catch (Exception e)
{
Debug.WriteLine("Could not serialize properties: " + e.Message);
- Xamarin.Forms.Log.Warning("Xamarin.Forms PropertyStore", $"Exception while writing Application properties: {e}");
+ Internals.Log.Warning("Xamarin.Forms PropertyStore", $"Exception while writing Application properties: {e}");
}
finally
{
catch (Exception e)
{
Debug.WriteLine("Could not move new serialized property file over old: " + e.Message);
- Xamarin.Forms.Log.Warning("Xamarin.Forms PropertyStore", $"Exception while writing Application properties: {e}");
+ Internals.Log.Warning("Xamarin.Forms PropertyStore", $"Exception while writing Application properties: {e}");
}
});
}
+using Xamarin.Forms;
+
namespace Xamarin.Forms.Platform.Tizen
{
public static class KeyboardExtensions
/// <param name="keyboard">The Xamarin.Forms.Keyboard class instance to be converted to ElmSharp.Keyboard.</param>
public static Native.Keyboard ToNative(this Keyboard keyboard)
{
- if (keyboard is NumericKeyboard)
+ if (keyboard == Keyboard.Numeric)
{
return Native.Keyboard.Number;
}
- else if (keyboard is TelephoneKeyboard)
+ else if (keyboard == Keyboard.Telephone)
{
return Native.Keyboard.PhoneNumber;
}
- else if (keyboard is EmailKeyboard)
+ else if (keyboard == Keyboard.Email)
{
return Native.Keyboard.Email;
}
- else if (keyboard is UrlKeyboard)
+ else if (keyboard == Keyboard.Url)
{
return Native.Keyboard.Url;
}
- else if (keyboard is ChatKeyboard)
+ else if (keyboard == Keyboard.Chat)
{
return Native.Keyboard.Emoticon;
}
using System;
using System.Collections.Generic;
-
+using Xamarin.Forms.Internals;
using EObject = ElmSharp.EvasObject;
namespace Xamarin.Forms.Platform.Tizen
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
+using Xamarin.Forms.Internals;
using ElmSharp;
using Tizen.Applications;
using TSystemInfo = Tizen.System.SystemInfo;
static void SetupInit(FormsApplication application)
{
- Color.Accent = GetAccentColor();
+ Color.SetAccent(GetAccentColor());
Context = application;
if (!IsInitialized)
{
- Xamarin.Forms.Log.Listeners.Add(new XamarinLogListener());
+ Internals.Log.Listeners.Add(new XamarinLogListener());
if (System.Threading.SynchronizationContext.Current == null)
{
TizenSynchronizationContext.Initialize();
string profile = ((TizenDeviceInfo)Device.Info).Profile;
if (profile == "mobile")
{
- Device.Idiom = TargetIdiom.Phone;
+ Device.SetIdiom(TargetIdiom.Phone);
}
else if (profile == "tv")
{
- Device.Idiom = TargetIdiom.TV;
+ Device.SetIdiom(TargetIdiom.TV);
}
else if (profile == "desktop")
{
- Device.Idiom = TargetIdiom.Desktop;
+ Device.SetIdiom(TargetIdiom.Desktop);
}
else
{
- Device.Idiom = TargetIdiom.Unsupported;
+ Device.SetIdiom(TargetIdiom.Unsupported);
}
ExpressionSearch.Default = new TizenExpressionSearch();
using System;
using System.ComponentModel;
using System.Diagnostics;
+using Xamarin.Forms.Internals;
using Tizen.Applications;
using ElmSharp;
using EButton = ElmSharp.Button;
switch (_window.CurrentOrientation)
{
case Native.DisplayOrientations.None:
- Device.Info.CurrentOrientation = DeviceOrientation.Other;
+ Device.Info.CurrentOrientation = Internals.DeviceOrientation.Other;
break;
case Native.DisplayOrientations.Portrait:
- Device.Info.CurrentOrientation = DeviceOrientation.PortraitUp;
+ Device.Info.CurrentOrientation = Internals.DeviceOrientation.PortraitUp;
break;
case Native.DisplayOrientations.Landscape:
- Device.Info.CurrentOrientation = DeviceOrientation.LandscapeLeft;
+ Device.Info.CurrentOrientation = Internals.DeviceOrientation.LandscapeLeft;
break;
case Native.DisplayOrientations.PortraitFlipped:
- Device.Info.CurrentOrientation = DeviceOrientation.PortraitDown;
+ Device.Info.CurrentOrientation = Internals.DeviceOrientation.PortraitDown;
break;
case Native.DisplayOrientations.LandscapeFlipped:
- Device.Info.CurrentOrientation = DeviceOrientation.LandscapeRight;
+ Device.Info.CurrentOrientation = Internals.DeviceOrientation.LandscapeRight;
break;
}
};
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
-using System.Reflection;
+using Xamarin.Forms.Internals;
using ElmSharp;
using EColor = ElmSharp.Color;
using EGestureType = ElmSharp.GestureLayer.GestureType;
-using System;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Platform.Tizen
{
using System.Threading.Tasks;
+using Xamarin.Forms.Internals;
using ElmSharp;
using EImage = ElmSharp.Image;
using ESize = ElmSharp.Size;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
+using Xamarin.Forms.Internals;
using ElmSharp;
namespace Xamarin.Forms.Platform.Tizen.Native
-using System;
+using Xamarin.Forms.Internals;
+using Xamarin.Forms.Xaml.Internals;
using EObject = ElmSharp.EvasObject;
namespace Xamarin.Forms.Platform.Tizen
{
- class NativeBindingService : Xaml.INativeBindingService
+ class NativeBindingService : INativeBindingService
{
public bool TrySetBinding(object target, string propertyName, BindingBase binding)
{
using System;
+using Xamarin.Forms.Internals;
+using Xamarin.Forms.Xaml.Internals;
using EObject = ElmSharp.EvasObject;
namespace Xamarin.Forms.Platform.Tizen
{
- class NativeValueConverterService : Xaml.INativeValueConverterService
+ class NativeValueConverterService : INativeValueConverterService
{
public bool ConvertTo(object value, Type toType, out object nativeValue)
{
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
+using Xamarin.Forms.Internals;
using ElmSharp;
namespace Xamarin.Forms.Platform.Tizen
using System;
using System.Collections.Specialized;
+using Xamarin.Forms.Internals;
using ElmSharp;
using EProgressBar = ElmSharp.ProgressBar;
using ERect = ElmSharp.Rect;
/// </summary>
public class ListViewRenderer : ViewRenderer<ListView, Native.ListView>, IDisposable
{
+ IListViewController Controller => Element;
+ ITemplatedItemsView<Cell> TemplatedItemsView => Element;
+
/// <summary>
/// Event handler for ScrollToRequested.
/// </summary>
int position;
var scrollArgs = (ITemplatedItemsListScrollToRequestedEventArgs)e;
- var templatedItems = Element.TemplatedItems;
+ var templatedItems = TemplatedItemsView.TemplatedItems;
if (Element.IsGroupingEnabled)
{
var results = templatedItems.GetGroupAndIndexOfItem(scrollArgs.Group, scrollArgs.Item);
}
else
{
- var templatedItems = Element.TemplatedItems;
+ var templatedItems = TemplatedItemsView.TemplatedItems;
var results = templatedItems.GetGroupAndIndexOfItem(Element.SelectedItem);
if (results.Item1 != -1 && results.Item2 != -1)
{
GetNaviItemForPage(nre.Page).Delete();
}
- async void InsertPageBeforeRequestedHandler(object sender, NavigationRequestedEventArgs nre)
+ void InsertPageBeforeRequestedHandler(object sender, NavigationRequestedEventArgs nre)
{
- TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool>();
- if (Element.CurrentNavigationTask != null && !Element.CurrentNavigationTask.IsCompleted)
- {
- await Element.CurrentNavigationTask;
- }
- Element.CurrentNavigationTask = tcs.Task;
+ if (nre.BeforePage == null)
+ throw new ArgumentNullException("before");
+ if (nre.Page == null)
+ throw new ArgumentNullException("page");
Device.StartTimer(TimeSpan.FromMilliseconds(0), () =>
{
EvasObject page = Platform.GetOrCreateRenderer(nre.Page).NativeView;
_naviFrame.InsertBefore(GetNaviItemForPage(nre.BeforePage), page, SpanTitle(nre.Page.Title));
- tcs.SetResult(true);
UpdateHasNavigationBar(nre.Page);
return false;
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using System.ComponentModel;
+using Xamarin.Forms.Internals;
using ElmSharp;
using ESize = ElmSharp.Size;
using ERect = ElmSharp.Rect;
Layout layout = Element as Layout;
if (layout != null)
{
- layout.InvalidateMeasureInternal(Internals.InvalidationTrigger.MeasureChanged);
+ layout.InvalidateMeasureNonVirtual(InvalidationTrigger.MeasureChanged);
layout.ForceLayout();
}
}
/// <param name="effect">The effect to register.</param>
void OnRegisterEffect(PlatformEffect effect)
{
- effect.Container = Element.Parent == null ? null : Platform.GetRenderer(Element.Parent).NativeView;
- effect.Control = NativeView;
+ effect.SetContainer(Element.Parent == null ? null : Platform.GetRenderer(Element.Parent).NativeView);
+ effect.SetControl(NativeView);
}
void OnMoved(object sender, EventArgs e)
WebNavigationEvent _eventState;
TWebView _control = null;
+ IWebViewController ElementController => Element;
+
public void LoadHtml(string html, string baseUrl)
{
_control.LoadHtml(html, baseUrl);
void UpdateCanGoBackForward()
{
- Element.CanGoBack = _control.CanGoBack();
- Element.CanGoForward = _control.CanGoForward();
+ ElementController.CanGoBack = _control.CanGoBack();
+ ElementController.CanGoForward = _control.CanGoForward();
}
}
}
\ No newline at end of file
+using Xamarin.Forms.Internals;
+
namespace Xamarin.Forms.Platform.Tizen
{
internal class ResourcesProvider : ISystemResourcesProvider
using System;
using System.IO;
using System.Threading.Tasks;
+using Xamarin.Forms.Internals;
using TApplication = Tizen.Applications.Application;
namespace Xamarin.Forms.Platform.Tizen
return new FileStream(fullPath, mode, access, share);
}
- public Task<Stream> OpenFileAsync(string path, FileMode mode, FileAccess access)
+ public Task<Stream> OpenFileAsync(string path, Internals.FileMode mode, Internals.FileAccess access)
{
return Task.FromResult(OpenFile(path, (System.IO.FileMode)mode, (System.IO.FileAccess)access));
}
- public Task<Stream> OpenFileAsync(string path, FileMode mode, FileAccess access, FileShare share)
+ public Task<Stream> OpenFileAsync(string path, Internals.FileMode mode, Internals.FileAccess access, Internals.FileShare share)
{
return Task.FromResult(OpenFile(path, (System.IO.FileMode)mode, (System.IO.FileAccess)access, (System.IO.FileShare)share));
}