LegacyLayouts\Grid.cs (24)
14 public partial class Grid : Layout<View>, IGridController, IElementConfiguration<Grid>, IGridLayout
85 public new IGridList<View> Children
156 protected override void OnAdded(View view)
168 protected override void OnRemoved(View view)
174 internal override void ComputeConstraintForView(View view)
259 var child = sender as View;
293 public interface IGridList<T> : IList<T> where T : View
295 void Add(View view, int left, int top);
296 void Add(View view, int left, int right, int top, int bottom);
297 void AddHorizontal(IEnumerable<View> views);
298 void AddHorizontal(View view);
299 void AddVertical(IEnumerable<View> views);
300 void AddVertical(View view);
303 class GridElementCollection : ElementCollection<View>, IGridList<View>
312 public void Add(View view, int left, int top)
321 public void Add(View view, int left, int right, int top, int bottom)
342 public void AddHorizontal(IEnumerable<View> views)
350 public void AddHorizontal(View view)
365 public void AddVertical(IEnumerable<View> views)
373 public void AddVertical(View view)
389 this.Max<View, int?>(w => GetRow(w) + GetRowSpan(w)) ?? 0,
394 this.Max<View, int?>(w => GetColumn(w) + GetColumnSpan(w)) ?? 0,
LegacyLayouts\RelativeLayout.cs (38)
15 public class RelativeLayout : Layout<View>, IElementConfiguration<RelativeLayout>
35 IEnumerable<View> _childrenInSolveOrder;
57 public new IRelativeList<View> Children
62 IEnumerable<View> ChildrenInSolveOrder
69 var result = new List<View>();
70 var solveTable = new Dictionary<View, bool>();
71 foreach (View child in Children.Cast<View>())
76 List<View> unsolvedChildren = Children.Cast<View>().ToList();
79 List<View> copy = unsolvedChildren.ToList();
81 foreach (View child in copy)
102 View view = bindable as View;
107 void UpdateBoundsConstraint(View view)
174 foreach (View child in ChildrenInSolveOrder)
183 protected override void OnAdded(View view)
196 protected override void OnRemoved(View view)
214 foreach (View child in ChildrenInSolveOrder)
232 foreach (View child in ChildrenInSolveOrder)
242 bool CanSolveView(View view, Dictionary<View, bool> solveTable)
245 var parents = new List<View>();
260 View p = parents[i];
275 void CreateBoundsFromConstraints(View view, Constraint xConstraint, Constraint yConstraint, Constraint widthConstraint, Constraint heightConstraint)
277 var parents = new List<View>();
327 static Rect SolveView(View view)
341 public interface IRelativeList<T> : IList<T> where T : View
350 class RelativeElementCollection : ElementCollection<View>, IRelativeList<View>
359 public void Add(View view, Expression<Func<Rect>> bounds)
368 public void Add(View view, Expression<Func<double>> x = null, Expression<Func<double>> y = null, Expression<Func<double>> width = null, Expression<Func<double>> height = null)
377 var parents = new List<View>();
378 parents.AddRange(ExpressionSearch.Default.FindObjects<View>(x));
379 parents.AddRange(ExpressionSearch.Default.FindObjects<View>(y));
380 parents.AddRange(ExpressionSearch.Default.FindObjects<View>(width));
381 parents.AddRange(ExpressionSearch.Default.FindObjects<View>(height));
390 public void Add(View view, Constraint xConstraint = null, Constraint yConstraint = null, Constraint widthConstraint = null, Constraint heightConstraint = null)
Platform\iOS\DragAndDropDelegate.cs (14)
64 return HandleDragStarting((View)_viewHandler.VirtualView, _viewHandler, session, new PlatformDragStartingEventArgs(_viewHandler.PlatformView, interaction, session));
84 HandleDragLeave((View)_viewHandler.VirtualView, package, session.LocalDragSession, new PlatformDragEventArgs(_viewHandler.PlatformView, interaction, session));
105 if (HandleDragOver((View)_viewHandler.VirtualView, package, session.LocalDragSession, platformArgs))
122 _viewHandler.VirtualView is View view)
127 else if (_viewHandler.VirtualView is View v)
135 void SendEventArgs<TRecognizer>(Action<TRecognizer> func, View view)
152 public UIDragItem[] HandleDragStarting(View element, IPlatformViewHandler handler, IUIDragSession session, PlatformDragStartingEventArgs platformArgs)
241 View = handler.VirtualView as View,
246 void HandleDropCompleted(View element, PlatformDropCompletedEventArgs platformArgs)
252 bool HandleDragLeave(View element, DataPackage dataPackage, IUIDragSession session, PlatformDragEventArgs platformArgs)
272 bool HandleDragOver(View element, DataPackage dataPackage, IUIDragSession session, PlatformDragEventArgs platformArgs)
292 void HandleDrop(View element, DataPackage datapackage, IUIDropSession session, PlatformDropEventArgs platformArgs)
311 }, (View)element);
363 public View View { get; set; }
PlatformConfiguration\TizenSpecific\VisualElement.cs (42)
27 public static readonly BindableProperty NextFocusUpViewProperty = BindableProperty.Create("NextFocusUpView", typeof(View), typeof(VisualElement), default(View));
30 public static readonly BindableProperty NextFocusDownViewProperty = BindableProperty.Create("NextFocusDownView", typeof(View), typeof(VisualElement), default(View));
33 public static readonly BindableProperty NextFocusLeftViewProperty = BindableProperty.Create("NextFocusLeftView", typeof(View), typeof(VisualElement), default(View));
36 public static readonly BindableProperty NextFocusRightViewProperty = BindableProperty.Create("NextFocusRightView", typeof(View), typeof(VisualElement), default(View));
39 public static readonly BindableProperty NextFocusBackViewProperty = BindableProperty.Create("NextFocusBackView", typeof(View), typeof(VisualElement), default(View));
42 public static readonly BindableProperty NextFocusForwardViewProperty = BindableProperty.Create("NextFocusForwardView", typeof(View), typeof(VisualElement), default(View));
248 public static View GetNextFocusUpView(BindableObject element)
250 return (View)element.GetValue(NextFocusUpViewProperty);
258 public static void SetNextFocusUpView(BindableObject element, View value)
268 public static View GetNextFocusUpView(this IPlatformElementConfiguration<Tizen, FormsElement> config)
279 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusUpView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value)
290 public static View GetNextFocusDownView(BindableObject element)
292 return (View)element.GetValue(NextFocusDownViewProperty);
300 public static void SetNextFocusDownView(BindableObject element, View value)
310 public static View GetNextFocusDownView(this IPlatformElementConfiguration<Tizen, FormsElement> config)
321 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusDownView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value)
332 public static View GetNextFocusLeftView(BindableObject element)
334 return (View)element.GetValue(NextFocusLeftViewProperty);
342 public static void SetNextFocusLeftView(BindableObject element, View value)
352 public static View GetNextFocusLeftView(this IPlatformElementConfiguration<Tizen, FormsElement> config)
363 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusLeftView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value)
374 public static View GetNextFocusRightView(BindableObject element)
376 return (View)element.GetValue(NextFocusRightViewProperty);
384 public static void SetNextFocusRightView(BindableObject element, View value)
394 public static View GetNextFocusRightView(this IPlatformElementConfiguration<Tizen, FormsElement> config)
405 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusRightView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value)
416 public static View GetNextFocusBackView(BindableObject element)
418 return (View)element.GetValue(NextFocusBackViewProperty);
426 public static void SetNextFocusBackView(BindableObject element, View value)
436 public static View GetNextFocusBackView(this IPlatformElementConfiguration<Tizen, FormsElement> config)
447 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusBackView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value)
458 public static View GetNextFocusForwardView(BindableObject element)
460 return (View)element.GetValue(NextFocusForwardViewProperty);
468 public static void SetNextFocusForwardView(BindableObject element, View value)
478 public static View GetNextFocusForwardView(this IPlatformElementConfiguration<Tizen, FormsElement> config)
489 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusForwardView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value)
PointerGestureRecognizer.cs (5)
189 internal void SendPointerEntered(View sender, Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? platformArgs = null)
202 internal void SendPointerExited(View sender, Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? platformArgs = null)
215 internal void SendPointerMoved(View sender, Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? platformArgs = null)
228 internal void SendPointerPressed(View sender, Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? platformArgs = null)
241 internal void SendPointerReleased(View sender, Func<IElement?, Point?>? getPosition, PlatformPointerEventArgs? platformArgs = null)
Properties\AssemblyInfo.cs (10)
106[assembly: StyleProperty("margin", typeof(View), nameof(View.MarginProperty))]
107[assembly: StyleProperty("margin-left", typeof(View), nameof(View.MarginLeftProperty))]
108[assembly: StyleProperty("margin-top", typeof(View), nameof(View.MarginTopProperty))]
109[assembly: StyleProperty("margin-right", typeof(View), nameof(View.MarginRightProperty))]
110[assembly: StyleProperty("margin-bottom", typeof(View), nameof(View.MarginBottomProperty))]
View\View.cs (15)
18 /// Because <see cref="View" /> ultimately inherits from <see cref="BindableObject" />, application developers can use the Model-View-ViewModel architecture, as well as XAML, to develop portable user interfaces.
26 BindableProperty.Create(nameof(VerticalOptions), typeof(LayoutOptions), typeof(View), LayoutOptions.Fill,
28 ((View)bindable).InvalidateMeasureInternal(InvalidationTrigger.VerticalOptionsChanged));
32 BindableProperty.Create(nameof(HorizontalOptions), typeof(LayoutOptions), typeof(View), LayoutOptions.Fill,
34 ((View)bindable).InvalidateMeasureInternal(InvalidationTrigger.HorizontalOptionsChanged));
38 BindableProperty.Create(nameof(Margin), typeof(Thickness), typeof(View), default(Thickness),
42 BindableProperty.Create("MarginLeft", typeof(double), typeof(View), default(double),
53 BindableProperty.Create("MarginTop", typeof(double), typeof(View), default(double),
64 BindableProperty.Create("MarginRight", typeof(double), typeof(View), default(double),
75 BindableProperty.Create("MarginBottom", typeof(double), typeof(View), default(double),
91 /// Initializes a new instance of the <see cref="View"/> class
93 /// <remarks>It is unlikely that an application developer would want to create an instance of <see cref="View"/> on their own.</remarks>
257 /// Invoked whenever the binding context of the <see cref="View" /> changes.
268 ((View)bindable).InvalidateMeasureInternal(InvalidationTrigger.MarginChanged);
320 if (newView is View v)