We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4553ba5 commit 1fe403bCopy full SHA for 1fe403b
windows/RCTPdf/RCTPdfControl.cpp
@@ -557,7 +557,11 @@ namespace winrt::RCTPdf::implementation
557
558
void RCTPdfControl::SetOrientation(bool horizontal) {
559
m_horizontal = horizontal;
560
- FindName(winrt::to_hstring("OrientationSelector")).try_as<StackPanel>().Orientation(m_horizontal ? Orientation::Horizontal : Orientation::Vertical);
+ StackPanel orientationSelector;
561
+ if (FindName(winrt::to_hstring("OrientationSelector")).try_as<StackPanel>(orientationSelector))
562
+ {
563
+ orientationSelector.Orientation(m_horizontal ? Orientation::Horizontal : Orientation::Vertical);
564
+ }
565
}
566
567
winrt::IAsyncAction RCTPdfControl::RenderVisiblePages(int page) {
0 commit comments