101 строка
6.7 KiB
XML
101 строка
6.7 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="clr-namespace:Xamarin.Forms.Platform.WPF.Controls">
|
|
|
|
<Style TargetType="controls:FormsTabbedPage">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
|
<Setter Property="BarBackgroundColor" Value="{DynamicResource DefaultTabbedBarBackgroundColor}"/>
|
|
<Setter Property="BarTextColor" Value="{DynamicResource DefaultTabbedBarTextColor}"/>
|
|
<Setter Property="TitleBarBackgroundColor" Value="{DynamicResource DefaultTitleBarBackgroundColor}"/>
|
|
<Setter Property="TitleBarTextColor" Value="{DynamicResource DefaultTitleBarTextColor}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="controls:FormsTabbedPage">
|
|
|
|
<Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
Background="{TemplateBinding Background}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Height="40" VerticalAlignment="Center" Background="{Binding BarBackgroundColor, RelativeSource={RelativeSource TemplatedParent}}">
|
|
|
|
<ListBox x:Name="ChildrenList" ItemsSource="{TemplateBinding ItemsSource}"
|
|
SelectedItem="{Binding SelectedItem, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
|
SelectedIndex="{Binding SelectedIndex, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
|
ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderBrush="{Binding BarBackgroundColor, RelativeSource={RelativeSource TemplatedParent}}"
|
|
ScrollViewer.CanContentScroll="False" Background="{Binding BarBackgroundColor, RelativeSource={RelativeSource TemplatedParent}}"
|
|
ScrollViewer.PanningMode="Both" HorizontalAlignment="Center">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="FontFamily" Value="Calibri" />
|
|
<Setter Property="FontSize" Value="23"/>
|
|
<Setter Property="Foreground" Value="{Binding BarTextColor, RelativeSource={RelativeSource AncestorType={x:Type controls:FormsTabbedPage}}}"/>
|
|
<Setter Property="TextOptions.TextFormattingMode" Value="Ideal" />
|
|
<Setter Property="Margin" Value="15,0,20,0" />
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
|
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
|
<StackPanel HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
|
|
|
<ContentPresenter x:Name="Presenter" />
|
|
</StackPanel>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
|
|
<ListBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ListBox.ItemsPanel>
|
|
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Name="border" Height="35" BorderBrush="White" >
|
|
<Border.Style>
|
|
<Style TargetType="{x:Type Border}">
|
|
<Setter Property="Opacity" Value="0.6"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}" Value="True">
|
|
<Setter Property="Opacity" Value="1"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="{Binding Title}"
|
|
FontSize="18" />
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
</Grid>
|
|
|
|
<controls:FormsTransitioningContentControl Grid.Row="1" x:Name="PART_Multi_Content" Transition="Normal"
|
|
ContentLoader="{TemplateBinding ContentLoader}" Source="{TemplateBinding SelectedItem}" />
|
|
|
|
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
</ResourceDictionary> |