<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Bili.App.Controls.Community">
    <Style x:Key="DefaultCommentPageViewStyle" TargetType="local:CommentPageView">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:CommentPageView">
                    <Grid>
                        <local:CommentMainView
                            DataContext="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.MainViewModel}"
                            ViewModel="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.MainViewModel}"
                            Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.IsMainShown, Converter={StaticResource BoolToVisibilityConverter}}" />
                        <local:CommentDetailView
                            DataContext="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.DetailViewModel}"
                            ViewModel="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.DetailViewModel}"
                            Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.IsDetailShown, Converter={StaticResource BoolToVisibilityConverter}}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style BasedOn="{StaticResource DefaultCommentPageViewStyle}" TargetType="local:CommentPageView" />
</ResourceDictionary>
