We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In our code, we wanted to reuse a named DataTemplate that was defined in our Styles.xaml:
<DataTemplate x:Key="TabHeaderTemplate" x:DataType="material:TabItem"> <Label Padding="0,0,0,5" HorizontalOptions="Center" VerticalOptions="Center" LineBreakMode="MiddleTruncation" Text="{Binding Title}"> <Label.Triggers> <DataTrigger Binding="{Binding IsSelected}" TargetType="Label" Value="True"> <Setter Property="TextColor" Value="{StaticResource Primary}" /> <Setter Property="Scale" Value="1.2" /> </DataTrigger> <DataTrigger Binding="{Binding IsSelected}" TargetType="Label" Value="False"> <Setter Property="TextColor" Value="Gray" /> <Setter Property="Scale" Value="1" /> </DataTrigger> </Label.Triggers> </Label> </DataTemplate>
and apply as an implicit style it as a default to all TabItem s like so:
TabItem
<Style TargetType="material:TabItem"> <Setter Property="HeaderTemplate" Value="{StaticResource TabHeaderTemplate}" /> </Style>
Currently, this is not possible, since TabItem.cs does not expose its properties DataTemplate and ContentTemplate as BindableProperties.
DataTemplate
ContentTemplate
#662 would enable this possibility.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In our code, we wanted to reuse a named DataTemplate that was defined in our Styles.xaml:
and apply as an implicit style it as a default to all
TabItem
s like so:Currently, this is not possible, since TabItem.cs does not expose its properties
DataTemplate
andContentTemplate
as BindableProperties.#662 would enable this possibility.
The text was updated successfully, but these errors were encountered: