Skip to content

Commit

Permalink
feat(swipecontrol): Implement the core of the SwipeControl
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed Apr 19, 2021
1 parent cd6c42b commit 3bfc847
Show file tree
Hide file tree
Showing 10 changed files with 2,319 additions and 2,150 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#pragma warning disable 114 // new keyword hiding
namespace Windows.UI.Xaml.Controls
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial class SwipeControl : global::Windows.UI.Xaml.Controls.ContentControl
{
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::Windows.UI.Xaml.Controls.SwipeItems TopItems
{
Expand All @@ -21,7 +21,7 @@ public partial class SwipeControl : global::Windows.UI.Xaml.Controls.ContentCon
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::Windows.UI.Xaml.Controls.SwipeItems RightItems
{
Expand All @@ -35,7 +35,7 @@ public partial class SwipeControl : global::Windows.UI.Xaml.Controls.ContentCon
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::Windows.UI.Xaml.Controls.SwipeItems LeftItems
{
Expand All @@ -49,7 +49,7 @@ public partial class SwipeControl : global::Windows.UI.Xaml.Controls.ContentCon
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::Windows.UI.Xaml.Controls.SwipeItems BottomItems
{
Expand All @@ -63,39 +63,39 @@ public partial class SwipeControl : global::Windows.UI.Xaml.Controls.ContentCon
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static global::Windows.UI.Xaml.DependencyProperty BottomItemsProperty { get; } =
Windows.UI.Xaml.DependencyProperty.Register(
nameof(BottomItems), typeof(global::Windows.UI.Xaml.Controls.SwipeItems),
typeof(global::Windows.UI.Xaml.Controls.SwipeControl),
new FrameworkPropertyMetadata(default(global::Windows.UI.Xaml.Controls.SwipeItems)));
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static global::Windows.UI.Xaml.DependencyProperty LeftItemsProperty { get; } =
Windows.UI.Xaml.DependencyProperty.Register(
nameof(LeftItems), typeof(global::Windows.UI.Xaml.Controls.SwipeItems),
typeof(global::Windows.UI.Xaml.Controls.SwipeControl),
new FrameworkPropertyMetadata(default(global::Windows.UI.Xaml.Controls.SwipeItems)));
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static global::Windows.UI.Xaml.DependencyProperty RightItemsProperty { get; } =
Windows.UI.Xaml.DependencyProperty.Register(
nameof(RightItems), typeof(global::Windows.UI.Xaml.Controls.SwipeItems),
typeof(global::Windows.UI.Xaml.Controls.SwipeControl),
new FrameworkPropertyMetadata(default(global::Windows.UI.Xaml.Controls.SwipeItems)));
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public static global::Windows.UI.Xaml.DependencyProperty TopItemsProperty { get; } =
Windows.UI.Xaml.DependencyProperty.Register(
nameof(TopItems), typeof(global::Windows.UI.Xaml.Controls.SwipeItems),
typeof(global::Windows.UI.Xaml.Controls.SwipeControl),
new FrameworkPropertyMetadata(default(global::Windows.UI.Xaml.Controls.SwipeItems)));
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public SwipeControl() : base()
{
Expand All @@ -111,7 +111,7 @@ public SwipeControl() : base()
// Forced skipping of method Windows.UI.Xaml.Controls.SwipeControl.TopItems.set
// Forced skipping of method Windows.UI.Xaml.Controls.SwipeControl.BottomItems.get
// Forced skipping of method Windows.UI.Xaml.Controls.SwipeControl.BottomItems.set
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public void Close()
{
Expand Down
5 changes: 5 additions & 0 deletions src/Uno.UI/Helpers/WinUI/DownlevelHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@ public static bool ToDisplayNameExists()
{
return false;
}

public static bool SetIsTranslationEnabledExists()
{
return false;
}
}
}
1 change: 1 addition & 0 deletions src/Uno.UI/Helpers/WinUI/SharedHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ public static object FindResource(string resource, ResourceDictionary resources,
return resources.HasKey(boxedResource) ? resources.Lookup(boxedResource) : defaultValue;
}

public static object FindInApplicationResources(string resource) => FindInApplicationResources(resource, default);
public static object FindInApplicationResources(string resource, object defaultValue)
{
return FindResource(resource, Application.Current.Resources, defaultValue);
Expand Down
30 changes: 30 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/SwipeControl/SwipeControl.Uno.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Text;

namespace Windows.UI.Xaml.Controls
{
public partial class SwipeControl
{
[Conditional("DEBUG")]
private static void SWIPECONTROL_TRACE_INFO(SwipeControl that, [CallerLineNumber] int TRACE_MSG_METH = -1, [CallerMemberName] string METH_NAME = null, SwipeControl _ = null)
{

}

[Conditional("DEBUG")]
private static void SWIPECONTROL_TRACE_VERBOSE(SwipeControl that, [CallerLineNumber] int TRACE_MSG_METH = -1, [CallerMemberName] string METH_NAME = null, SwipeControl _ = null)
{

}

// TODO Uno - Interactions
private void InitializeInteractionTracker() { }

private void ConfigurePositionInertiaRestingValues() { }

private void IdleStateEntered(object @null, object @also_null) { }
}
}
Loading

0 comments on commit 3bfc847

Please sign in to comment.