Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xamlbasic #5

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ReactWindows/Playground/Playground.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>Playground</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.17081.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@
<Compile Include="Bridge\Queue\ActionQueueTests.cs" />
<Compile Include="Internal\Constants\DictionaryHelpers.cs" />
<Compile Include="Internal\DispatcherHelpers.cs" />
<Compile Include="Internal\MockViewManager.cs" />
<Compile Include="Modules\NetInfo\NetInfoModuleTests.cs" />
<Compile Include="Modules\Storage\AsyncStorageModuleTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public override IReadOnlyDictionary<string, object> ExportedViewConstants
}
}

public override IReadOnlyDictionary<string, string> NativeProperties
public override IReadOnlyDictionary<string, string> NativeProps
{
get
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using ReactNative.Bridge;
using ReactNative.Collections;
using ReactNative.Json;
using System;
using System.Collections.Generic;
using System.Runtime.ExceptionServices;
Expand Down
6 changes: 3 additions & 3 deletions ReactWindows/ReactNative.Net46/Modules/Dialog/DialogModule.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Portions derived from React Native:
// Copyright (c) 2015-present, Facebook, Inc.
// Licensed under the MIT License.

using Newtonsoft.Json.Linq;
using ReactNative.Bridge;
using ReactNative.Collections;
using ReactNative.Json;
using System.Collections.Generic;
using System.Windows;

Expand Down Expand Up @@ -84,4 +84,4 @@ public void showAlert(
}

}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Portions derived from React Native:
// Copyright (c) 2015-present, Facebook, Inc.
// Licensed under the MIT License.

using Newtonsoft.Json.Linq;
using ReactNative.Bridge;
using ReactNative.Collections;
using ReactNative.Json;
using ReactNative.Common;
using ReactNative.Modules.Core;
using ReactNative.Tracing;
Expand Down
11 changes: 6 additions & 5 deletions ReactWindows/ReactNative.Net46/UIManager/BaseViewManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace ReactNative.UIManager
{
/// <summary>
/// Base class that should be suitable for the majority of subclasses of <see cref="IViewManager"/>.
/// It provides support for base view properties such as opacity, etc.
/// It provides support for base view props such as opacity, etc.
/// </summary>
/// <typeparam name="TFrameworkElement">Type of framework element.</typeparam>
/// <typeparam name="TLayoutShadowNode">Type of shadow node.</typeparam>
Expand All @@ -33,11 +33,12 @@ public abstract class BaseViewManager<TFrameworkElement, TLayoutShadowNode> :
new Dictionary<TFrameworkElement, Action<TFrameworkElement, Dimensions>>();

/// <summary>
/// Set's the <typeparamref name="TFrameworkElement"/> styling layout
/// properties, based on the <see cref="JObject"/> map.
/// Sets the 3D tranform on the <typeparamref name="TFrameworkElement"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="transforms">The list of transforms.</param>
/// <param name="transforms">
/// The transform matrix or the list of transforms.
/// </param>
[ReactProp("transform")]
public void SetTransform(TFrameworkElement view, JArray transforms)
{
Expand Down Expand Up @@ -65,7 +66,7 @@ public void SetOpacity(TFrameworkElement view, double opacity)
}

/// <summary>
/// Sets the overflow property for the <typeparamref name="TFrameworkElement"/>.
/// Sets the overflow prop for the <typeparamref name="TFrameworkElement"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="overflow">The overflow value.</param>
Expand Down
15 changes: 8 additions & 7 deletions ReactWindows/ReactNative.Net46/UIManager/UIViewOperationQueue.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using Newtonsoft.Json.Linq;
using ReactNative.Bridge;
using ReactNative.Modules.Core;

Expand Down Expand Up @@ -35,13 +36,13 @@ public UIViewOperationQueue(ReactContext reactContext, ViewManagerRegistry viewM
/// <param name="themedContext">The React context.</param>
/// <param name="viewReactTag">The view React tag.</param>
/// <param name="viewClassName">The view class name.</param>
/// <param name="initialProps">The initial properties.</param>
/// <param name="initialProps">The initial props.</param>
/// <param name="rootViewTag">Root view tag.</param>
public void EnqueueCreateView(
ThemedReactContext themedContext,
int viewReactTag,
string viewClassName,
ReactStylesDiffMap initialProps,
JObject initialProps,
int rootViewTag)
{
EnqueueCreateView(
Expand All @@ -55,24 +56,24 @@ public void EnqueueCreateView(
/// Used by the native animated module to bypass the process of
/// updating the values through the shadow view hierarchy. This method
/// will directly update the native views, which means that updates for
/// layout-related properties won't be handled properly.
/// layout-related props won't be handled properly.
/// </summary>
/// <param name="tag">The view tag.</param>
/// <param name="props">The properties</param>
/// <param name="props">The props.</param>
/// <remarks>
/// Make sure you know what you're doing before calling this method :)
/// </remarks>
public bool SynchronouslyUpdateViewOnDispatcherThread(int tag, ReactStylesDiffMap props)
public bool SynchronouslyUpdateViewOnDispatcherThread(int tag, JObject props)
{
DispatcherHelpers.AssertOnDispatcher();

// First check if the view exists, as the views are created in
// batches, and native modules attempting to synchronously interact
// with views may attempt to update properties before the batch has
// with views may attempt to update props before the batch has
// been processed.
if (NativeViewHierarchyManager.ViewExists(tag))
{
NativeViewHierarchyManager.UpdateProperties(tag, props);
NativeViewHierarchyManager.UpdateProps(tag, props);
return true;
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public void SetBorderColor(Border view, uint? color)
/// Sets the border thickness of the image view.
/// </summary>
/// <param name="view">The image view instance.</param>
/// <param name="index">The property index.</param>
/// <param name="index">The prop index.</param>
/// <param name="width">The border width in pixels.</param>
[ReactPropGroup(
ViewProps.BorderWidth,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public void SetFontStyle(PasswordBox view, string fontStyleString)
}

/// <summary>
/// Sets the default text placeholder property on the <see cref="PasswordBox"/>.
/// Sets the default text placeholder prop on the <see cref="PasswordBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="placeholder">The placeholder text.</param>
Expand All @@ -171,7 +171,7 @@ public void SetPlaceholder(PasswordBox view, string placeholder)
}

/// <summary>
/// Sets the placeholderTextColor property on the <see cref="ReactTextBox"/>.
/// Sets the placeholderTextColor prop on the <see cref="ReactTextBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="color">The placeholder text color.</param>
Expand Down Expand Up @@ -224,7 +224,7 @@ public void SetSelectionColor(PasswordBox view, uint color)
}

/// <summary>
/// Sets the text alignment property on the <see cref="PasswordBox"/>.
/// Sets the text alignment prop on the <see cref="PasswordBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="alignment">The text alignment.</param>
Expand All @@ -235,7 +235,7 @@ public void SetTextVerticalAlign(PasswordBox view, string alignment)
}

/// <summary>
/// Sets the editablity property on the <see cref="PasswordBox"/>.
/// Sets the editablity prop on the <see cref="PasswordBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="editable">The editable flag.</param>
Expand Down Expand Up @@ -271,7 +271,7 @@ public void SetTabIndex(PasswordBox view, int tabIndex)
}

/// <summary>
/// Sets the max character length property on the <see cref="PasswordBox"/>.
/// Sets the max character length prop on the <see cref="PasswordBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="maxCharLength">The max length.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void SetOnSelectionChange(ReactTextBox view, bool onSelectionChange)
}

/// <summary>
/// Sets the default text placeholder property on the <see cref="ReactTextBox"/>.
/// Sets the default text placeholder prop on the <see cref="ReactTextBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="placeholder">The placeholder text.</param>
Expand All @@ -178,7 +178,7 @@ public void SetPlaceholder(ReactTextBox view, string placeholder)
}

/// <summary>
/// Sets the placeholderTextColor property on the <see cref="ReactTextBox"/>.
/// Sets the placeholderTextColor prop on the <see cref="ReactTextBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="color">The placeholder text color.</param>
Expand Down Expand Up @@ -231,7 +231,7 @@ public void SetSelectionColor(ReactTextBox view, uint color)
}

/// <summary>
/// Sets the text alignment property on the <see cref="ReactTextBox"/>.
/// Sets the text alignment prop on the <see cref="ReactTextBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="alignment">The text alignment.</param>
Expand All @@ -242,7 +242,7 @@ public void SetTextAlign(ReactTextBox view, string alignment)
}

/// <summary>
/// Sets the text alignment property on the <see cref="ReactTextBox"/>.
/// Sets the text alignment prop on the <see cref="ReactTextBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="alignment">The text alignment.</param>
Expand All @@ -253,7 +253,7 @@ public void SetTextVerticalAlign(ReactTextBox view, string alignment)
}

/// <summary>
/// Sets the editablity property on the <see cref="ReactTextBox"/>.
/// Sets the editablity prop on the <see cref="ReactTextBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="editable">The editable flag.</param>
Expand Down Expand Up @@ -289,7 +289,7 @@ public void SetTabIndex(ReactTextBox view, int tabIndex)
}

/// <summary>
/// Sets the max character length property on the <see cref="ReactTextBox"/>.
/// Sets the max character length prop on the <see cref="ReactTextBox"/>.
/// </summary>
/// <param name="view">The view instance.</param>
/// <param name="maxCharLength">The max length.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using ReactNative.UIManager;
using System;
using System.Collections.Generic;
using System.Windows;

namespace ReactNative.Tests
{
Expand Down Expand Up @@ -51,7 +50,7 @@ public virtual string Name
}
}

public virtual IReadOnlyDictionary<string, string> NativeProperties
public virtual IReadOnlyDictionary<string, string> NativeProps
{
get
{
Expand All @@ -72,37 +71,37 @@ public virtual ReactShadowNode CreateShadowNodeInstance()
throw new NotImplementedException();
}

public virtual DependencyObject CreateView(ThemedReactContext reactContext)
public virtual object CreateView(ThemedReactContext reactContext)
{
throw new NotImplementedException();
}

public Dimensions GetDimensions(DependencyObject view)
public Dimensions GetDimensions(object view)
{
throw new NotImplementedException();
}

public virtual void OnDropViewInstance(ThemedReactContext reactContext, DependencyObject view)
public virtual void OnDropViewInstance(ThemedReactContext reactContext, object view)
{
throw new NotImplementedException();
}

public virtual void ReceiveCommand(DependencyObject view, int commandId, JArray args)
public virtual void ReceiveCommand(object view, int commandId, JArray args)
{
throw new NotImplementedException();
}

public void SetDimensions(DependencyObject view, Dimensions dimensions)
public void SetDimensions(object view, Dimensions dimensions)
{
throw new NotImplementedException();
}

public virtual void UpdateExtraData(DependencyObject root, object extraData)
public virtual void UpdateExtraData(object root, object extraData)
{
throw new NotImplementedException();
}

public virtual void UpdateProperties(DependencyObject viewToUpdate, ReactStylesDiffMap props)
public virtual void UpdateProps(object viewToUpdate, JObject props)
{
throw new NotImplementedException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Internal\MockPromise.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Internal\MockReactCallback.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Internal\MockReactInstance.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Internal\MockViewManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Internal\TestReactQueueConfiguration.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\AppState\AppStateModuleTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\Core\JSTimersTests.cs" />
Expand All @@ -34,13 +35,12 @@
<Compile Include="$(MSBuildThisFileDirectory)Modules\Network\TaskCancellationManagerTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Modules\WebSocket\WebSocketModuleTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\AppRegistryTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\DependencyObjectExtensionsTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\PropertySetterTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\ReactStylesDiffMapTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\PropSetterTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\ViewExtensionsTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\RootViewHelperTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\ShadowNodeRegistryTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\ViewAtIndexTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\ViewManagerRegistryTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\ViewManagersPropertyCacheTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\ViewManagersPropCacheTests.cs" />
</ItemGroup>
</Project>
Loading