Skip to content

Commit 193cb73

Browse files
scott108rozele
authored andcommitted
[wpf]new feature/add SetOverflow in BaseViewManager (microsoft#1266)
1 parent a1466fa commit 193cb73

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

ReactWindows/ReactNative.Net46/UIManager/BaseViewManager.cs

+17-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,23 @@ public void SetOpacity(TFrameworkElement view, double opacity)
5353
view.Opacity = opacity;
5454
}
5555

56-
// ToDo: SetOverflow - ReactProp("overflow")
56+
/// <summary>
57+
/// Sets the overflow property for the <typeparamref name="TFrameworkElement"/>.
58+
/// </summary>
59+
/// <param name="view">The view instance.</param>
60+
/// <param name="overflow">The overflow value.</param>
61+
[ReactProp("overflow")]
62+
public void SetOverflow(TFrameworkElement view, string overflow)
63+
{
64+
if (overflow == "hidden")
65+
{
66+
view.ClipToBounds = true;
67+
}
68+
else
69+
{
70+
view.ClipToBounds = false;
71+
}
72+
}
5773

5874
/// <summary>
5975
/// Sets the z-index of the element.

0 commit comments

Comments
 (0)