I have some buttons in my app, which are redirecting to view with OxyPlot graph.
After updating OxyPlot version, graph doesn’t appear. Only after reopening the view it becomes visible.
However, this situation occurs only if button, which redirects user to view with graph, is placed inside outer element like DropDown button or popup. Here is code of button:
<Button x:Name="OpenGraphButton" Command="{Binding OpenGraphCmd}" CommandParameter="{Binding}"
Style="{DynamicResource DefaultButtonStyle}"
HorizontalContentAlignment="Left"
Content="Open graph"
IsEnabled="{Binding AllowOpenGraph}"
Click="OpenGraphButton_OnClick"/>
The way it placed inside outer element:
<Popup x:Name="GraphActionsSelectionPopup" Placement="Top" PlacementTarget="{Binding ElementName=GraphPopupButton}"
Focusable="False" PopupAnimation="Slide" StaysOpen="False" Width="Auto">
<StackPanel Orientation="Vertical">
<Button x:Name="OpenGraphButton" Command="{Binding OpenGraphCmd}" CommandParameter="{Binding}"
Style="{DynamicResource DefaultButtonStyle}"
HorizontalContentAlignment="Left"
Content="Open graph"
IsEnabled="{Binding AllowOpenGraph}"
Click="OpenGraphButton_OnClick"/>
</StackPanel>
</Popup>
or
<mah:DropDownButton>
<mah:DropDownButton.Content>
<iconPacks:PackIconMaterial Kind="PlayOutline"/>
</mah:DropDownButton.Content>
<mah:DropDownButton.Items>
<Button x:Name="OpenGraphButton" Command="{Binding OpenGraphCmd}" CommandParameter="{Binding}"
Style="{DynamicResource DefaultButtonStyle}"
HorizontalContentAlignment="Left"
Content="Open graph"
IsEnabled="{Binding AllowOpenGraph}"
Click="OpenGraphButton_OnClick"/>
</mah:DropDownButton.Items>
</mah:DropDownButton>
Also, I tried to inspect this by Snoop app, but when I start inspection, the graph appears.
I assume that there is some issues with full rendering of elements tree. Did anyone encounter such problems? Would be grateful to hear any advices from you.