<UserControl x:Class="FasdDesktopUi.Pages.DetailsPage.UserControls.DetailsPageRefreshControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:FasdDesktopUi.Pages.DetailsPage.UserControls"
             xmlns:vc="clr-namespace:FasdDesktopUi.Basics.Converter"
             xmlns:uc="clr-namespace:FasdDesktopUi.Basics.UserControls"
             x:Name="RefreshControl"
             mc:Ignorable="d"
             d:DesignHeight="450"
             d:DesignWidth="800">
    <UserControl.Resources>
        <vc:LanguageDefinitionsConverter x:Key="LanguageConverter" />
        <BooleanToVisibilityConverter x:Key="BoolToVisibility" />
    </UserControl.Resources>

    <StackPanel x:Name="RefreshStackPanel"
                Orientation="Horizontal">
        <TextBlock  Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=DetailsPage.RefreshNow}"
                    Style="{DynamicResource DetailsPage.DataHistory.ControlBar.Action}"
                    MouseUp="RefreshDetailsButton_MouseUp"
                    TouchDown="RefreshDetailsButton_TouchDown" />

        <TextBlock x:Name="LastDataRequestTextBlock"
                   Style="{DynamicResource DetailsPage.DataHistory.ControlBar.Text}"
                   Margin="5 0" />

        <uc:LoadingDataIndicator x:Name="LoadingDataIndicatorUc"
                                 Visibility="{Binding ElementName=RefreshControl, Path=IsDataIncomplete, Converter={StaticResource BoolToVisibility}}" />

    </StackPanel>

</UserControl>
