mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 22:05:14 +00:00
Adds support to compile react-native-svg against WinAppSDK (#2255)
# Summary Adds namespace redirects required to compile react-native-svg sources against WinAppSDK for react-native-windows. ## Test Plan There aren't a lot of examples for building react-native-windows apps in open source targeting WinAppSDK, but we have some proprietary builds, and this source code is working there (it is also still compatible with UWP).
This commit is contained in:
@@ -8,7 +8,7 @@ using namespace winrt;
|
||||
using namespace Microsoft::ReactNative;
|
||||
|
||||
namespace winrt::RNSVG::implementation {
|
||||
Windows::UI::Xaml::FrameworkElement RenderableViewManager::CreateView() {
|
||||
xaml::FrameworkElement RenderableViewManager::CreateView() {
|
||||
switch (m_class) {
|
||||
case RNSVG::SVGClass::RNSVGGroup:
|
||||
return winrt::RNSVG::GroupView(m_reactContext);
|
||||
@@ -75,7 +75,7 @@ IMapView<hstring, ViewManagerPropertyType> RenderableViewManager::NativeProps()
|
||||
}
|
||||
|
||||
void RenderableViewManager::UpdateProperties(
|
||||
Windows::UI::Xaml::FrameworkElement const &view,
|
||||
xaml::FrameworkElement const &view,
|
||||
Microsoft::ReactNative::IJSValueReader const &propertyMapReader) {
|
||||
if (auto const &renderable{view.try_as<RenderableView>()}) {
|
||||
renderable->UpdateProperties(propertyMapReader);
|
||||
|
||||
Reference in New Issue
Block a user