<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:converter="clr-namespace:Txgy.EWS.Client.Common.Converters;assembly=Txgy.EWS.Client.Common">
    <converter:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter"/>

    <ControlTemplate TargetType="UserControl" x:Key="ToolBarTemplate">
        <Grid Margin="20">
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Border BorderBrush="#DDD" BorderThickness="0,0,0,1"/>
            <TextBox Text="" VerticalAlignment="Center" Width="300" HorizontalAlignment="Left" Style="{DynamicResource SearchTextBoxStyle}"/>
            <StackPanel VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal">
                <Button Content="刷新" Style="{DynamicResource NormalButtonStyle}" 
                                        Background="#FF0ABEFF" Width="70" Margin="5,0"
                                        Command="{Binding RefreshCommand}"
                        Visibility="{Binding IsShowRefresh,Converter={StaticResource Bool2VisibilityConverter}}"/>
                <Button Content="添加" Style="{DynamicResource IconWithContentButtonStyle}" Width="100"
                                        Tag="&#xe603;" Background="#FFF05005"
                                        Command="{Binding AddCommand}"
                        Visibility="{Binding IsShowAdd,Converter={StaticResource Bool2VisibilityConverter}}"/>
                <Button Content="导出" Style="{DynamicResource IconWithContentButtonStyle}" Width="100"
                                        Tag="&#xe603;" Background="#FFF05005"
                                        Command="{Binding ExportCommand}"
                        Visibility="{Binding IsShowExport,Converter={StaticResource Bool2VisibilityConverter}}"/>
            </StackPanel>

            <ContentPresenter Grid.Row="1"/>
        </Grid>
    </ControlTemplate>
</ResourceDictionary>