├── .gitignore
├── .gitmodules
├── Appercode.UIFramework.Abstract.csproj
├── Appercode.UIFramework.Droid.csproj
├── Appercode.UIFramework.iOS.csproj
├── Appercode.UIFramework.sln
├── ControlTemplate.cs
├── Controls
├── AppBarButton.cs
├── AppBarButton.iOS.cs
├── AppercodePage.Droid.cs
├── AppercodePage.cs
├── AppercodePage.iOS.cs
├── AppercodeVisualRoot.cs
├── Base
│ └── GridSizeCollectionBase.cs
├── BitmapIcon.cs
├── BitmapIcon.iOS.cs
├── Border.Abstract.cs
├── Border.Droid.cs
├── Border.cs
├── Border.iOS.cs
├── Button.Abstract.cs
├── Button.Droid.cs
├── Button.cs
├── Button.iOS.cs
├── Canvas.Abstract.cs
├── Canvas.Droid.cs
├── Canvas.cs
├── Canvas.iOS.cs
├── CheckBox.Droid.cs
├── CheckBox.cs
├── CheckBox.iOS.cs
├── ClickMode.cs
├── ColumnDefinition.cs
├── ColumnDefinitionCollection.cs
├── CommandBar.Abstract.cs
├── CommandBar.cs
├── CommandBar.iOS.cs
├── CommandBarElementCollection.cs
├── ContentControl.Abstract.cs
├── ContentControl.Droid.cs
├── ContentControl.cs
├── ContentControl.iOS.cs
├── ContentPresenter.Abstract.cs
├── ContentPresenter.Droid.cs
├── ContentPresenter.cs
├── ContentPresenter.iOS.cs
├── Control.Abstract.cs
├── Control.Droid.cs
├── Control.cs
├── Control.iOS.cs
├── DataTemplateSelector.cs
├── DatePicker.cs
├── DatePicker.iOS.cs
├── DefinitionBase.cs
├── FontFamily.cs
├── FontStyle.cs
├── FontStyleType.cs
├── FontStyles.cs
├── FontWeight.cs
├── FontWeightType.cs
├── FontWeights.cs
├── Grid.Abstract.cs
├── Grid.Droid.cs
├── Grid.cs
├── Grid.iOS.cs
├── HyperlinkButton.Abstract.cs
├── HyperlinkButton.Droid.cs
├── HyperlinkButton.cs
├── HyperlinkButton.iOS.cs
├── ICommandBarElement.cs
├── IPivotItemProvider.cs
├── Image.Abstract.cs
├── Image.Droid.cs
├── Image.cs
├── Image.iOS.cs
├── Input
│ └── InputScope.cs
├── ItemCollection.cs
├── ItemsControl.Abstract.cs
├── ItemsControl.Droid.cs
├── ItemsControl.cs
├── ItemsControl.iOS.cs
├── ItemsPanelTemplate.cs
├── ListBox.Droid.cs
├── ListBox.cs
├── ListBox.iOS.cs
├── ListBoxItem.Abstract.cs
├── ListBoxItem.Droid.cs
├── ListBoxItem.cs
├── ListBoxItem.iOS.cs
├── ListPicker.Abstract.cs
├── ListPicker.Droid.cs
├── ListPicker.cs
├── ListPicker.iOS.cs
├── ManipulationMode.cs
├── Media
│ ├── AppercodeColors.cs
│ ├── ImageSource.Droid.cs
│ ├── ImageSource.cs
│ ├── ImageSource.iOS.cs
│ ├── Imaging
│ │ ├── BitmapCreateOptions.cs
│ │ ├── BitmapImage.Abstract.cs
│ │ ├── BitmapImage.Droid.cs
│ │ ├── BitmapImage.cs
│ │ ├── BitmapImage.iOS.cs
│ │ ├── BitmapSource.cs
│ │ └── DownloadProgressEventArgs.cs
│ └── TokenizerHelper.cs
├── MediaElement.Abstract.cs
├── MediaElement.Droid.cs
├── MediaElement.cs
├── MediaElement.iOS.cs
├── NativeAppercodeFragment.cs
├── NativeControl
│ ├── ActivityEventArgs.cs
│ ├── BundleEventArgs.cs
│ ├── CheckBoxDrawableHelper.cs
│ ├── ContentViewGroup.cs
│ ├── IndeterminateUIProgressView.cs
│ ├── NativeContentControl.cs
│ ├── NativeScrollViewer.cs
│ ├── NativeToggleButton.cs
│ ├── RadioButtonDrawableHelper.cs
│ └── Wrapers
│ │ ├── ClickDetector.cs
│ │ ├── IClickableView.cs
│ │ ├── IJavaFinalizable.cs
│ │ ├── ISelectableView.cs
│ │ ├── ITapableView.cs
│ │ ├── NativeMediaPlayer.cs
│ │ ├── TapDetector.cs
│ │ ├── WrapedEditText.cs
│ │ ├── WrapedImageView.cs
│ │ ├── WrapedProgressBar.cs
│ │ ├── WrapedTextView.cs
│ │ ├── WrapedVideoView.cs
│ │ ├── WrapedViewGroup.cs
│ │ └── WrappedSeekBar.cs
├── Navigation
│ ├── IFrame.cs
│ ├── IFrameStyler.cs
│ ├── NavigatedEventHandler.cs
│ ├── NavigatingCancelEventArgs.cs
│ ├── NavigatingCancelEventHandler.cs
│ ├── NavigatingEventArgs.cs
│ ├── NavigationEventArgs.cs
│ ├── NavigationFailedEventArgs.cs
│ ├── NavigationFailedEventHandler.cs
│ ├── NavigationMode.cs
│ ├── NavigationService.cs
│ ├── NavigationStoppedEventHandler.cs
│ ├── NavigationType.cs
│ ├── Primitives
│ │ ├── TabBarTab.cs
│ │ ├── TabBarTabsCollection.cs
│ │ └── ViewPagerPage.cs
│ ├── StackNavigationFrame.Driod.cs
│ ├── StackNavigationFrame.cs
│ ├── StackNavigationFrame.iOS.cs
│ ├── TabsNavigationFrame.Droid.cs
│ ├── TabsNavigationFrame.cs
│ └── TabsNavigationFrame.iOS.cs
├── NotifyEventArgs.cs
├── Orientation.cs
├── OrientationChangedEventArgs.cs
├── Page.cs
├── PageOrientation.cs
├── Panel.Abstract.cs
├── Panel.Droid.cs
├── Panel.cs
├── Panel.iOS.cs
├── PasswordBox.Abstract.cs
├── PasswordBox.Droid.cs
├── PasswordBox.cs
├── PasswordBox.iOS.cs
├── Pivot.Abstract.cs
├── Pivot.Droid.cs
├── Pivot.cs
├── Pivot.iOS.cs
├── PivotHeaderItem.cs
├── PivotHeaderMode.cs
├── PivotHeadersControl.Abstract.cs
├── PivotHeadersControl.Droid.cs
├── PivotHeadersControl.cs
├── PivotHeadersControl.iOS.cs
├── PivotItem.cs
├── PivotItemContainerGenerator.cs
├── PivotVirtualizingPanel.Abstract.cs
├── PivotVirtualizingPanel.Droid.cs
├── PivotVirtualizingPanel.cs
├── PivotVirtualizingPanel.iOS.cs
├── Popups
│ ├── MessageDialog.Droid.cs
│ ├── MessageDialog.cs
│ ├── MessageDialog.iOS.cs
│ └── UICommand.cs
├── PresentationFrameworkCollection.cs
├── Primitives
│ ├── ButtonBase.Abstract.cs
│ ├── ButtonBase.Droid.cs
│ ├── ButtonBase.cs
│ ├── ButtonBase.iOS.cs
│ ├── GeneratorDirection.cs
│ ├── GeneratorPosition.cs
│ ├── IItemContainerGenerator.cs
│ ├── IVirtualizingPanel.cs
│ ├── IconElement.cs
│ ├── IconElement.iOS.cs
│ ├── ItemContainerGenerator.cs
│ ├── PickerBase.Abstract.cs
│ ├── PickerBase.Droid.cs
│ ├── PickerBase.cs
│ ├── PickerBase.iOS.cs
│ ├── RangeBase.Abstract.cs
│ ├── RangeBase.Droid.cs
│ ├── RangeBase.cs
│ ├── RangeBase.iOS.cs
│ ├── Selector.cs
│ ├── ToggleButton.Abstract.cs
│ ├── ToggleButton.Droid.cs
│ ├── ToggleButton.cs
│ └── ToggleButton.iOS.cs
├── ProgressBar.Abstract.cs
├── ProgressBar.Droid.cs
├── ProgressBar.cs
├── ProgressBar.iOS.cs
├── ProgressRing.cs
├── ProgressRing.iOS.cs
├── RadioButton.Droid.cs
├── RadioButton.cs
├── RadioButton.iOS.cs
├── RangePicker.Abstract.cs
├── RangePicker.Droid.cs
├── RangePicker.cs
├── RangePicker.iOS.cs
├── RowDefinition.cs
├── RowDefinitionCollection.cs
├── ScrollBarVisibility.cs
├── ScrollViewer.Abstract.cs
├── ScrollViewer.Droid.cs
├── ScrollViewer.cs
├── ScrollViewer.iOS.cs
├── SelectionChangedEventHandler.cs
├── SelectionMode.cs
├── Slider.Abstract.cs
├── Slider.Droid.cs
├── Slider.cs
├── Slider.iOS.cs
├── StackPanel.Abstract.cs
├── StackPanel.Droid.cs
├── StackPanel.cs
├── StackPanel.iOS.cs
├── SupportedPageOrientation.cs
├── TextAlignment.cs
├── TextBlock.Abstract.cs
├── TextBlock.Droid.cs
├── TextBlock.cs
├── TextBlock.iOS.cs
├── TextBox.Abstract.cs
├── TextBox.Droid.cs
├── TextBox.cs
├── TextBox.iOS.cs
├── TextChangedEventHandler.cs
├── TextTrimming.cs
├── TextWrapping.cs
├── TypeConverters.cs
├── UIElement.Abstract.cs
├── UIElement.Droid.cs
├── UIElement.cs
├── UIElement.iOS.cs
├── UIElementCollection.cs
├── UserControl.Abstract.cs
├── UserControl.Droid.cs
├── UserControl.cs
├── UserControl.iOS.cs
├── Validation.cs
├── ValidationError.cs
├── ValidationErrorEventAction.cs
├── ValidationErrorEventArgs.cs
├── VirtualizingPanel.cs
├── VirtualizingStackPanel.Abstract.cs
├── VirtualizingStackPanel.Droid.cs
├── VirtualizingStackPanel.cs
├── VirtualizingStackPanel.iOS.cs
├── Visibility.cs
├── WebBrowser.Abstract.cs
├── WebBrowser.Droid.cs
├── WebBrowser.cs
├── WebBrowser.iOS.cs
└── WebBrowserBase.cs
├── Data
├── Binding.cs
├── BindingBase.cs
├── BindingExpression.cs
├── BindingExpressionBase.cs
├── BindingMode.cs
├── BindingOperations.cs
├── CollectionView.cs
├── CollectionViewGroup.cs
├── CollectionViewSource.cs
├── FilterEventArgs.cs
├── FilterEventHandler.cs
├── IValueConverter.cs
├── RelativeSource.cs
├── RelativeSourceMode.cs
└── UpdateSourceTrigger.cs
├── DataTemplate.cs
├── Device
├── GeoCoordinate.cs
├── ScreenProperties.Droid.cs
├── ScreenProperties.cs
└── ScreenProperties.iOS.cs
├── FrameworkElementFactory.cs
├── FrameworkTemplate.Abstract.cs
├── FrameworkTemplate.cs
├── GridLength.cs
├── GridLengthConverter.cs
├── GridUnitType.cs
├── Helpers
├── EnumerableHelper.cs
├── ResourceDictionaryManager.cs
├── UIImageExtension.cs
└── WeakEventHandler.cs
├── Input
└── GestureEventArgs.cs
├── Internals
├── BaseValueSourceInternal.cs
├── BindingValueCache.cs
├── BindingValueChangedEventArgs.cs
├── Boxes
│ └── BooleanBoxes.cs
├── CollectionView
│ ├── CollectionViewGroupInternal.cs
│ ├── CollectionViewGroupRoot.cs
│ ├── CollectionViewProxy.cs
│ ├── EnumerableCollectionView.cs
│ ├── IViewLifetime.cs
│ ├── ListCollectionView.cs
│ ├── SortFieldComparer.cs
│ ├── ViewManager.cs
│ ├── ViewRecord.cs
│ └── ViewTable.cs
├── DataContextChangedEventArgs.cs
├── DataContextChangedEventHandler.cs
├── DataContextChangedReason.cs
├── DefaultValueConverter.cs
├── DeferredReference.cs
├── DeferredResourceReference.cs
├── DependencyPropertyChangedWeakListener.cs
├── DependencySource.cs
├── DynamicValueConverter.cs
├── ExpressionMode.cs
├── Helpers
│ ├── MathF.cs
│ └── ThicknessExtensions.cs
├── ICollectionChangedListener.cs
├── IDataContextChangedListener.cs
├── IErrorsChangedListener.cs
├── IMarkupExtension.cs
├── ISealable.cs
├── InterfaceConverter.cs
├── LogicalOp.cs
├── ObjectSourceConverter.cs
├── ObjectTargetConverter.cs
├── PathParser
│ ├── CLRPropertyListener.cs
│ ├── DependencyPropertyAccessStepDescriptor.cs
│ ├── DependencyPropertyListener.cs
│ ├── IRaisePropertyPathStepChanged.cs
│ ├── ISourcePropertyChanged.cs
│ ├── IndexerListener.cs
│ ├── IndexerPathStep.cs
│ ├── IndexerPathStepDescriptor.cs
│ ├── PropertyAccessPathStep.cs
│ ├── PropertyAccessPathStepDescriptor.cs
│ ├── PropertyListener.cs
│ ├── PropertyPathChangedEventArgs.cs
│ ├── PropertyPathListener.cs
│ ├── PropertyPathStep.cs
│ ├── PropertyPathStepChangedHandler.cs
│ ├── PropertyPathStepDescriptor.cs
│ ├── SourcePathStepDescriptor.cs
│ ├── SourcePropertyPathStep.cs
│ ├── WeakDependencyPropertyChangedListener.cs
│ └── WeakPropertyChangedListener.cs
├── PropertyPathParser.cs
├── PropertyValue.cs
├── PropertyValueType.cs
├── ResourceDictionaryCollection.cs
├── ResourceReferenceExpression.cs
├── ResourcesChangeInfo.cs
├── ResourcesChangedEventArgs.cs
├── SourceDefaultValueConverter.cs
├── StyleHelper.cs
├── SystemConvertConverter.cs
├── TargetDefaultValueConverter.cs
├── TriggerCondition.cs
├── WeakCollectionChangedListener.cs
├── WeakDataContextChangedListener.cs
├── WeakErrorsChangedListener.cs
└── WeakRefKey.cs
├── Key.snk
├── LICENSE.md
├── LogicalTreeHelper.cs
├── Markup
├── StaticResource.cs
└── TemplateBindingExtension.cs
├── PerfomanceLogger.cs
├── Properties
└── AssemblyInfo.cs
├── PropertyPath.cs
├── README.md
├── Resources
├── anim
│ ├── fadein.xml
│ └── fadeout.xml
└── iOS_Resources
│ ├── CheckBoxChecked.png
│ ├── CheckBoxChecked@2x.png
│ ├── CheckBoxCheckediOS6.png
│ ├── CheckBoxCheckediOS6@2x.png
│ ├── CheckBoxUnchecked.png
│ ├── CheckBoxUnchecked@2x.png
│ ├── CheckBoxUncheckediOS6.png
│ ├── CheckBoxUncheckediOS6@2x.png
│ ├── ProgressIndicatorBar.png
│ ├── ProgressIndicatorBar@2x.png
│ ├── ProgressIndicatorDefault.png
│ ├── ProgressIndicatorDefault@2x.png
│ ├── RadioButtonChecked.png
│ ├── RadioButtonChecked@2x.png
│ ├── RadioButtonCheckediOS6.png
│ ├── RadioButtonCheckediOS6@2x.png
│ ├── RadioButtonUnchecked.png
│ ├── RadioButtonUnchecked@2x.png
│ ├── RadioButtonUncheckediOS6.png
│ └── RadioButtonUncheckediOS6@2x.png
├── RoutedEvent.cs
├── RoutedEventArgs.cs
├── RoutingStrategy.cs
├── StylesAndResources
├── ApplicationResourcesAttribute.cs
├── ResourceDictionary.cs
├── Setter.Abstract.cs
├── Setter.cs
├── SetterBase.cs
├── SetterBaseCollection.cs
├── Style.Abstract.cs
└── Style.cs
├── System.Windows
├── CornerRadius.cs
├── Duration.cs
├── ExceptionRoutedEventArgs.cs
├── Expression.cs
├── GetReadOnlyValueCallback.cs
├── HorizontalAlignment.cs
├── Input
│ └── FocusManager.cs
├── Markup
│ └── IAddChild.cs
├── Media
│ ├── Brush.Droid.cs
│ ├── Brush.cs
│ ├── Brush.iOS.cs
│ ├── BrushMappingMode.cs
│ ├── Color.Droid.cs
│ ├── Color.cs
│ ├── Color.iOS.cs
│ ├── ColorInterpolationMode.cs
│ ├── GradientBrush.cs
│ ├── GradientSpreadMethod.cs
│ ├── GradientStop.cs
│ ├── GradientStopCollection.cs
│ ├── ImageBrush.Droid.cs
│ ├── ImageBrush.cs
│ ├── MediaElementState.cs
│ ├── SolidColorBrush.Droid.cs
│ ├── SolidColorBrush.cs
│ ├── SolidColorBrush.iOS.cs
│ └── Stretch.cs
├── NullableBoolConverter.cs
├── ReadOnlyFrameworkPropertyMetadata.cs
├── RoutedPropertyChangedEventHandler.cs
├── Thickness.cs
├── Thickness.iOS.cs
├── Threading
│ ├── Dispatcher.Abstract.cs
│ ├── Dispatcher.Droid.cs
│ ├── Dispatcher.cs
│ ├── Dispatcher.iOS.cs
│ ├── DispatcherObject.Abstract.cs
│ ├── DispatcherObject.Droid.cs
│ ├── DispatcherObject.cs
│ └── DispatcherObject.iOS.cs
└── VerticalAlignment.cs
├── TemplateBindingExpression.cs
├── TextChangedEventArgs.cs
├── ValueConverterFactory.cs
├── packages.Appercode.UIFramework.Droid.config
└── packages
└── repositories.config
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "mono"]
2 | path = mono
3 | url = https://github.com/Appercode/mono.git
4 |
--------------------------------------------------------------------------------
/ControlTemplate.cs:
--------------------------------------------------------------------------------
1 | using Appercode.UI.Controls;
2 | using System;
3 | using System.Windows;
4 |
5 | namespace Appercode.UI
6 | {
7 | ///
8 | /// Specifies the visual structure of a Control that can be shared across multiple instances of the control.
9 | ///
10 | public class ControlTemplate : FrameworkTemplate
11 | {
12 | public static readonly DependencyProperty TargetTypeProperty =
13 | DependencyProperty.Register("TargetType", typeof(Type), typeof(ControlTemplate), new PropertyMetadata(typeof(Type)));
14 |
15 | public Type TargetType
16 | {
17 | get { return (Type)this.GetValue(TargetTypeProperty); }
18 | set { this.SetValue(TargetTypeProperty, value); }
19 | }
20 |
21 | public override DependencyObject LoadContent()
22 | {
23 | var content = base.LoadContent();
24 | var uiElement = content as UIElement;
25 | if (uiElement != null)
26 | {
27 | uiElement.ParentChanged += this.ContentParentChanged;
28 | }
29 |
30 | return content;
31 | }
32 |
33 | private void ContentParentChanged(object sender, EventArgs e)
34 | {
35 | var uiElement = sender as UIElement;
36 | if (uiElement != null && uiElement.Parent != null)
37 | {
38 | this.VisualTree.SetTemplateBindings(uiElement.Parent);
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Controls/AppBarButton.iOS.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UIKit;
3 |
4 | namespace Appercode.UI.Controls
5 | {
6 | public partial class AppBarButton
7 | {
8 | internal UIBarButtonItem GetNativeItem()
9 | {
10 | UIBarButtonItem nativeItem;
11 | var icon = this.Icon;
12 | if (icon != null)
13 | {
14 | nativeItem = icon.GetNativeItem();
15 | }
16 | else
17 | {
18 | var label = this.Label;
19 | nativeItem = string.IsNullOrEmpty(label) ?
20 | new UIBarButtonItem(UIBarButtonSystemItem.Done)
21 | : new UIBarButtonItem { Title = label };
22 | }
23 |
24 | nativeItem.Clicked += this.NativeItemClicked;
25 | return nativeItem;
26 | }
27 |
28 | protected internal override void NativeInit()
29 | {
30 | // Do nothing and do not call base method for AppBarButton
31 | }
32 |
33 | private void NativeItemClicked(object sender, EventArgs e)
34 | {
35 | this.OnClick();
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Controls/AppercodePage.Droid.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace Appercode.UI.Controls
8 | {
9 | public partial class AppercodePage
10 | {
11 | public NativeAppercodeFragment NativeFragment
12 | {
13 | get;
14 | set;
15 | }
16 |
17 | protected override void OnNavigatedTo(Navigation.NavigationEventArgs e)
18 | {
19 | base.OnNavigatedTo(e);
20 | }
21 |
22 | protected internal override void NativeInit()
23 | {
24 | base.NativeInit();
25 | if (this.Context != null && this.Parent != null)
26 | {
27 | if (NativeFragment == null)
28 | {
29 | var nativeApperCodeFragment = new NativeAppercodeFragment(this.NativeUIElement);
30 | this.NativeFragment = nativeApperCodeFragment;
31 | }
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Controls/BitmapIcon.cs:
--------------------------------------------------------------------------------
1 | using Appercode.UI.Controls.Primitives;
2 | using System;
3 | using System.Windows;
4 |
5 | namespace Appercode.UI.Controls
6 | {
7 | public partial class BitmapIcon : IconElement
8 | {
9 | public static readonly DependencyProperty UriSourceProperty =
10 | DependencyProperty.Register("UriSource", typeof(Uri), typeof(BitmapIcon), new PropertyMetadata(UriSourceChanged));
11 |
12 | public Uri UriSource
13 | {
14 | get { return (Uri)GetValue(UriSourceProperty); }
15 | set { this.SetValue(UriSourceProperty, value); }
16 | }
17 |
18 | private static void UriSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
19 | {
20 | var icon = d as BitmapIcon;
21 | if (icon != null)
22 | {
23 | icon.UriSourceChanged(e.NewValue as Uri);
24 | }
25 | }
26 |
27 | partial void UriSourceChanged(Uri newValue);
28 | }
29 | }
--------------------------------------------------------------------------------
/Controls/Border.Abstract.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Drawing;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Windows;
7 | using System.Windows.Markup;
8 | using System.Windows.Media;
9 |
10 | namespace Appercode.UI.Controls
11 | {
12 | [ContentProperty("Child")]
13 | public partial class Border
14 | {
15 |
16 | private Thickness NativePadding { get; set; }
17 | private Thickness NativeBorderThickness { get; set; }
18 | private CornerRadius NativeCornerRadius { get; set; }
19 | private Brush NativeBackground { get; set; }
20 | private Brush NativeBorderBrush { get; set; }
21 |
22 | private void OnNativeContentChanged(UIElement oldValue, UIElement newValue)
23 | {
24 | }
25 |
26 | private void NativeArrangeContent(RectangleF finalRect)
27 | {
28 | }
29 |
30 | private SizeF NativeMeasureContent(SizeF availableSize)
31 | {
32 | return new SizeF();
33 | }
34 | private void NativeOnBackgroundChanged()
35 | {
36 | }
37 |
38 | private void NativeOnBorderBrushChanged()
39 | {
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Controls/Button.Abstract.cs:
--------------------------------------------------------------------------------
1 | namespace Appercode.UI.Controls
2 | {
3 | public partial class Button
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/Controls/Button.Droid.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 | using System.Windows;
3 | using Appercode.UI.Controls.NativeControl;
4 |
5 | namespace Appercode.UI.Controls
6 | {
7 | public partial class Button
8 | {
9 | protected internal override void NativeInit()
10 | {
11 | base.NativeInit();
12 |
13 | if (this.NativeUIElement != null && this.controlTemplateInstance == null)
14 | {
15 | ((NativeContentControl)this.NativeUIElement).SetBackgroundDrawable(new Android.Widget.Button(this.Context).Background);
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Controls/Button.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows;
3 | using Appercode.UI.Controls.Primitives;
4 |
5 | namespace Appercode.UI.Controls
6 | {
7 | ///
8 | /// Represents a button control, which reacts to the event.
9 | ///
10 | public partial class Button : ButtonBase
11 | {
12 | ///
13 | /// Initializes a new instance of the Button class.
14 | ///
15 | public Button()
16 | {
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Controls/Canvas.Abstract.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Appercode.UI.Controls
8 | {
9 | public partial class Canvas
10 | {
11 | private void NativeReorderChildren()
12 | {
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Controls/Canvas.iOS.cs:
--------------------------------------------------------------------------------
1 | using CoreGraphics;
2 | using UIKit;
3 |
4 | namespace Appercode.UI.Controls
5 | {
6 | public partial class Canvas
7 | {
8 | protected internal override void NativeInit()
9 | {
10 | if (this.Parent != null)
11 | {
12 | if (this.NativeUIElement == null)
13 | {
14 | this.NativeUIElement = new UIView();
15 | }
16 | base.NativeInit();
17 | }
18 | }
19 |
20 | protected override void ArrangeChilds(CGSize size)
21 | {
22 | this.UpdateLayout();
23 | }
24 |
25 | private void NativeReorderChildren()
26 | {
27 | foreach (var child in this.Children)
28 | {
29 | this.NativeUIElement.BringSubviewToFront(child.NativeUIElement);
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/Controls/CheckBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Appercode.UI.Controls.Primitives;
6 |
7 | namespace Appercode.UI.Controls
8 | {
9 | public partial class CheckBox : ToggleButton
10 | {
11 | public CheckBox()
12 | {
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/Controls/ClickMode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Appercode.UI.Controls
4 | {
5 | public enum ClickMode
6 | {
7 | Release,
8 | Press,
9 | Hover
10 | }
11 | }
--------------------------------------------------------------------------------
/Controls/ColumnDefinitionCollection.cs:
--------------------------------------------------------------------------------
1 | using Appercode.UI.Controls.Base;
2 |
3 | namespace Appercode.UI.Controls
4 | {
5 | ///
6 | /// Provides access to an ordered, strongly typed collection of ColumnDefinition objects.
7 | ///
8 | public class ColumnDefinitionCollection : GridSizeCollectionBase
9 | {
10 | ///
11 | /// Initializes the column definition collection for specified grid
12 | ///
13 | internal ColumnDefinitionCollection(Grid owner) : base(owner)
14 | {
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Controls/CommandBar.Abstract.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Markup;
3 |
4 | namespace Appercode.UI.Controls
5 | {
6 | [ContentProperty("PrimaryCommands")]
7 | public partial class CommandBar : IAddChild
8 | {
9 | void IAddChild.AddChild(object value)
10 | {
11 | if (value == null)
12 | {
13 | throw new ArgumentNullException("value");
14 | }
15 |
16 | var barElement = value as ICommandBarElement;
17 | if (barElement == null)
18 | {
19 | throw new ArgumentException(string.Format("Cannot add child of type {0}.", value.GetType()));
20 | }
21 |
22 | this.PrimaryCommands.Add(barElement);
23 | }
24 |
25 | void IAddChild.AddText(string text)
26 | {
27 | throw new NotSupportedException();
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/Controls/CommandBar.iOS.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Appercode.UI.Controls
4 | {
5 | public partial class CommandBar : Control
6 | {
7 | protected internal override void NativeInit()
8 | {
9 | // Do nothing and do not call base method for CommandBar
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/Controls/CommandBarElementCollection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Appercode.UI.Controls
4 | {
5 | public sealed class CommandBarElementCollection : PresentationFrameworkCollection
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/Controls/ContentControl.Abstract.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 | using System.Windows;
3 | using System.Windows.Markup;
4 |
5 | namespace Appercode.UI.Controls
6 | {
7 | [ContentProperty("Content")]
8 | public partial class ContentControl : Control
9 | {
10 | public object NativeContent { get; set; }
11 |
12 | protected virtual void NativeArrangeContent(RectangleF contentFrame)
13 | {
14 | }
15 |
16 | private static double GetDefaultFontSize()
17 | {
18 | return 0d;
19 | }
20 |
21 | private void OnNativeContentChanged(object oldContent, object newContent)
22 | {
23 | }
24 |
25 | private SizeF NativeMeasureContent(SizeF availableSize)
26 | {
27 | return new SizeF();
28 | }
29 |
30 | protected Thickness GetNativePadding()
31 | {
32 | return new Thickness();
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/Controls/ContentControl.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appercode/Appercode.UIFramework/63eba322af789679293554d3dffd57114b0d4edd/Controls/ContentControl.cs
--------------------------------------------------------------------------------
/Controls/ContentPresenter.Abstract.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Appercode.UI.Controls
8 | {
9 | public partial class ContentPresenter
10 | {
11 | private void NativeTemplateUpdate(UIElement oldValue, UIElement value)
12 | {
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Controls/Control.Abstract.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows;
3 | using System.Windows.Media;
4 |
5 | namespace Appercode.UI.Controls
6 | {
7 | public partial class Control
8 | {
9 | protected bool NativeIsEnabled { get; set; }
10 |
11 | protected double NativeFontSize { get; set; }
12 |
13 | protected TextWrapping NativeTextWrapping { get; set; }
14 |
15 | protected TextTrimming NativeTextTrimming { get; set; }
16 |
17 | protected FontWeight NativeFontWeight { get; set; }
18 |
19 | protected FontStyle NativeFontStyle { get; set; }
20 |
21 | protected FontFamily NativeFontFamily { get; set; }
22 |
23 | protected Brush NativeForeground { get; set; }
24 |
25 | protected Thickness NativePadding { get; set; }
26 |
27 | protected virtual bool InternalFocus()
28 | {
29 | throw new NotImplementedException();
30 | }
31 |
32 | protected virtual void OnIsEnabledChanged()
33 | {
34 | }
35 |
36 | protected virtual void NativeOnbackgroundChange()
37 | {
38 | }
39 |
40 | private static double GetDefaultFontSize()
41 | {
42 | return 0.0;
43 | }
44 |
45 | private void RemoveControlTemplateInstance()
46 | {
47 | }
48 |
49 | private void AddControlTemplateInstance()
50 | {
51 | }
52 |
53 | private void ApplyNativePadding(Thickness padding)
54 | {
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/Controls/DataTemplateSelector.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace Appercode.UI.Controls
4 | {
5 | /// Provides a way to choose a based on the data object and the data-bound element.
6 | public class DataTemplateSelector
7 | {
8 | /// Initializes a new instance of the class.
9 | public DataTemplateSelector()
10 | {
11 | }
12 |
13 | /// When overridden in a derived class, returns a based on custom logic.
14 | /// Returns a or null. The default value is null.
15 | /// The data object for which to select the template.
16 | /// The data-bound object.
17 | public virtual DataTemplate SelectTemplate(object item, DependencyObject container)
18 | {
19 | return null;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/Controls/FontStyleType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Appercode.UI.Controls
7 | {
8 | internal enum FontStyleType
9 | {
10 | Normal,
11 | Oblique,
12 | Italic
13 | }
14 | }
--------------------------------------------------------------------------------
/Controls/FontStyles.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Appercode.UI.Controls
7 | {
8 | public static class FontStyles
9 | {
10 | public static FontStyle Italic
11 | {
12 | get
13 | {
14 | return FontStyles.EnsureFontStyle(FontStyleType.Italic);
15 | }
16 | }
17 |
18 | public static FontStyle Normal
19 | {
20 | get
21 | {
22 | return FontStyles.EnsureFontStyle(FontStyleType.Normal);
23 | }
24 | }
25 |
26 | internal static FontStyle EnsureFontStyle(FontStyleType style)
27 | {
28 | switch (style)
29 | {
30 | case FontStyleType.Normal:
31 | case FontStyleType.Italic:
32 | {
33 | return new FontStyle(style);
34 | }
35 | default:
36 | {
37 | throw new ArgumentOutOfRangeException("style");
38 | }
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Controls/FontWeightType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Appercode.UI.Controls
7 | {
8 | public enum FontWeightType
9 | {
10 | Thin = 100,
11 | ExtraLight = 200,
12 | Light = 300,
13 | Normal = 400,
14 | Medium = 500,
15 | SemiBold = 600,
16 | Bold = 700,
17 | ExtraBold = 800,
18 | Black = 900,
19 | ExtraBlack = 950
20 | }
21 | }
--------------------------------------------------------------------------------
/Controls/Grid.Abstract.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 |
3 | namespace Appercode.UI.Controls
4 | {
5 | public partial class Grid
6 | {
7 | ///
8 | /// This definition is only for XAML XSD schema generation
9 | ///
10 | public static readonly DependencyProperty ColumnDefinitionsProperty =
11 | DependencyProperty.Register(
12 | "ColumnDefinitions",
13 | typeof(ColumnDefinitionCollection),
14 | typeof(Grid),
15 | new PropertyMetadata());
16 |
17 | ///
18 | /// This definition is only for XAML XSD schema generation
19 | ///
20 | public static readonly DependencyProperty RowDefinitionsProperty =
21 | DependencyProperty.Register(
22 | "RowDefinitions",
23 | typeof(RowDefinitionCollection),
24 | typeof(Grid),
25 | new PropertyMetadata());
26 |
27 | private void NativeChildrenCollectionChanged()
28 | {
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/Controls/Grid.Droid.cs:
--------------------------------------------------------------------------------
1 | using Android.Content;
2 | using Android.Views;
3 | using Appercode.UI.Controls.NativeControl.Wrapers;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Text;
7 |
8 | namespace Appercode.UI.Controls
9 | {
10 | public class NativeGrid : WrapedViewGroup
11 | {
12 | public NativeGrid(Context context)
13 | : base(context)
14 | {
15 | }
16 |
17 | protected override void OnLayout(bool changed, int l, int t, int r, int b)
18 | {
19 | }
20 | }
21 |
22 | public partial class Grid
23 | {
24 | protected internal override void NativeInit()
25 | {
26 | if (this.Parent != null && this.Context != null)
27 | {
28 | if (this.NativeUIElement == null)
29 | {
30 | var nativeGrid = new NativeGrid(this.Context);
31 | var layoutParams = new ViewGroup.LayoutParams(0, 0);
32 | layoutParams.Width = double.IsNaN(this.NativeWidth) ? ViewGroup.LayoutParams.WrapContent : (int)this.NativeWidth;
33 | layoutParams.Height = double.IsNaN(this.NativeHeight) ? ViewGroup.LayoutParams.WrapContent : (int)this.NativeHeight;
34 | nativeGrid.LayoutParameters = layoutParams;
35 |
36 | this.NativeUIElement = nativeGrid;
37 | }
38 | }
39 |
40 | base.NativeInit();
41 | }
42 |
43 | protected override void ArrangeChilds(System.Drawing.SizeF size)
44 | {
45 | this.ArrangeCells(size);
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Controls/Grid.iOS.cs:
--------------------------------------------------------------------------------
1 | using CoreGraphics;
2 | using UIKit;
3 |
4 | namespace Appercode.UI.Controls
5 | {
6 | public partial class Grid
7 | {
8 | protected internal override void NativeInit()
9 | {
10 | if (this.Parent != null)
11 | {
12 | if (this.NativeUIElement == null)
13 | {
14 | this.NativeUIElement = new UIView();
15 | }
16 | base.NativeInit();
17 | }
18 | }
19 |
20 | protected override void ArrangeChilds(CGSize size)
21 | {
22 | this.ArrangeCells(size);
23 | }
24 |
25 | private void NativeChildrenCollectionChanged()
26 | {
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Controls/HyperlinkButton.Abstract.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Appercode.UI.Controls
8 | {
9 | public partial class HyperlinkButton
10 | {
11 | public Uri NativeNavigateUri { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Controls/HyperlinkButton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows;
3 | using Appercode.UI.Controls.Primitives;
4 | using Appercode.UI.Controls.Media;
5 | using System.Windows.Media;
6 |
7 | namespace Appercode.UI.Controls
8 | {
9 | public partial class HyperlinkButton : ButtonBase
10 | {
11 | public static readonly DependencyProperty NavigateUriProperty =
12 | DependencyProperty.Register("NavigateUri", typeof(Uri), typeof(HyperlinkButton),
13 | new PropertyMetadata(null, (d, e) =>
14 | {
15 | ((HyperlinkButton)d).NativeNavigateUri = (Uri)e.NewValue;
16 | }));
17 |
18 | static HyperlinkButton()
19 | {
20 | ForegroundProperty.AddOwner(typeof(HyperlinkButton), new PropertyMetadata(new SolidColorBrush(AppercodeColors.Blue)));
21 | }
22 |
23 | public HyperlinkButton()
24 | {
25 | }
26 |
27 | public Uri NavigateUri
28 | {
29 | get { return (Uri)this.GetValue(NavigateUriProperty); }
30 | set { this.SetValue(NavigateUriProperty, value); }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/Controls/ICommandBarElement.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Appercode.UI.Controls
4 | {
5 | public interface ICommandBarElement
6 | {
7 | event EventHandler VisibilityChanged;
8 |
9 | bool IsCompact { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/Controls/IPivotItemProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Appercode.UI.Controls;
6 |
7 | namespace Appercode.UI.Controls
8 | {
9 | public interface IPivotItemProvider
10 | {
11 | int Count { get; }
12 | UIElement CreateItemElement(int position);
13 | object GetHeader(int position);
14 | }
15 | }
--------------------------------------------------------------------------------
/Controls/Image.Abstract.cs:
--------------------------------------------------------------------------------
1 | using Appercode.UI.Controls.Media;
2 | using System;
3 | using System.Windows;
4 | using System.Windows.Media;
5 |
6 | namespace Appercode.UI.Controls
7 | {
8 | public sealed partial class Image : UIElement
9 | {
10 | private void ApplyNativeSource()
11 | {
12 | }
13 |
14 | private void ApplyNativeStretch()
15 | {
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Controls/Input/InputScope.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Appercode.UI.Controls.Input
8 | {
9 | public enum InputScope
10 | {
11 | Default,
12 | Text,
13 | Search,
14 | Numbers,
15 | EmailAddress
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Controls/ItemCollection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 |
7 | namespace Appercode.UI.Controls
8 | {
9 | public class ItemCollection : PresentationFrameworkCollection