mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
# 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).
36 lines
1.3 KiB
C++
36 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include "RenderableViewManager.g.h"
|
|
#include "RenderableView.h"
|
|
|
|
namespace winrt::RNSVG::implementation {
|
|
struct RenderableViewManager : RenderableViewManagerT<RenderableViewManager> {
|
|
public:
|
|
RenderableViewManager() = default;
|
|
|
|
// IViewManager
|
|
hstring Name() { return m_name; }
|
|
xaml::FrameworkElement CreateView();
|
|
|
|
// IViewManagerWithReactContext
|
|
Microsoft::ReactNative::IReactContext ReactContext() { return m_reactContext; }
|
|
void ReactContext(Microsoft::ReactNative::IReactContext const &value) { m_reactContext = value; }
|
|
|
|
// IViewManagerWithNativeProperties
|
|
void UpdateProperties(
|
|
xaml::FrameworkElement const &view,
|
|
Microsoft::ReactNative::IJSValueReader const &propertyMapReader);
|
|
virtual
|
|
Windows::Foundation::Collections::IMapView<hstring, Microsoft::ReactNative::ViewManagerPropertyType> NativeProps();
|
|
|
|
protected:
|
|
Microsoft::ReactNative::IReactContext m_reactContext{nullptr};
|
|
RNSVG::SVGClass m_class{RNSVG::SVGClass::Unknown};
|
|
hstring m_name{};
|
|
};
|
|
} // namespace winrt::RNSVG::implementation
|
|
|
|
namespace winrt::RNSVG::factory_implementation {
|
|
struct RenderableViewManager : RenderableViewManagerT<RenderableViewManager, implementation::RenderableViewManager> {};
|
|
} // namespace winrt::RNSVG::factory_implementation
|