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

Create borders on demand #1

Closed
wants to merge 20 commits into from
Closed
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
4 changes: 1 addition & 3 deletions ReactWindows/ReactNative.Shared/ReactNative.Shared.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,10 @@
<Compile Include="$(MSBuildThisFileDirectory)UIManager\Annotations\ReactPropBaseAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\Annotations\ReactPropGroupAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\AppRegistry.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\BorderedCanvasManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\BorderedViewParentManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\BorderedCanvas.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\BorderExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\ColorHelpers.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\IUIBlock.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\ReactShadowNodeExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\ReactShadowNodeVisitor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\DependencyObjectExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UIManager\DependencyObjectViewManager.cs" />
Expand Down
44 changes: 44 additions & 0 deletions ReactWindows/ReactNative.Shared/UIManager/BorderedCanvas.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using System;

#if WINDOWS_UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Data;
#else
using System.Windows;
using System.Windows.Controls;
#endif

namespace ReactNative.UIManager
{
/// <summary>
/// Represents a Canvas with an optional Border inside.
/// </summary>
public class BorderedCanvas : Canvas
{
private Border _border = null;

/// <summary>
/// The Border associated with this Canvas or null if it doesn't have a border.
/// The Border is always the first element in the Children collection.
/// </summary>
public Border Border
{
get
{
return _border;
}
set
{
if (_border != null)
{
throw new InvalidOperationException("The Canvas already has a Border");
}

_border = value;

Children.Insert(0, _border);
}
}
}
}
69 changes: 0 additions & 69 deletions ReactWindows/ReactNative.Shared/UIManager/BorderedCanvasManager.cs

This file was deleted.

254 changes: 0 additions & 254 deletions ReactWindows/ReactNative.Shared/UIManager/BorderedViewParentManager.cs

This file was deleted.

Loading