ich einige Arten in der App.xaml gesetzt habenGlobale Style in UWP XAML
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value ="HotPink"/>
</Style>
Dieser Stil funktioniert auf normalen Kontrollen, jedoch nicht in Datatemplates
<TextBlock Text="Test"></TextBlock> <!-- Works here -->
<ItemsControl ItemsSource="{Binding ViewModel.UniverseGroups}" HorizontalAlignment="Right" VerticalAlignment="Center">
<ItemsControl.ItemTemplate>
<DataTemplate>
<RelativePanel>
<TextBlock Text="{Binding Name}"></TextBlock>
<!-- This text still is black -->
</RelativePanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Gibt es eine Möglichkeit global zu machen Stile funktionieren auch in DataTemplates?
Das funktioniert auch gut für mich! – AntiHeadshot