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:
Eric Rozell
2024-04-12 05:10:19 -04:00
committed by GitHub
parent 4b51a41a22
commit 9f6f6fd40c
14 changed files with 60 additions and 53 deletions

View File

@@ -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);