Skip to content

Commit

Permalink
WinUI/UWP: Improve darkmode
Browse files Browse the repository at this point in the history
  • Loading branch information
dotMorten committed Aug 5, 2023
1 parent 94a1529 commit b10d385
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
xmlns:mapping="using:Esri.ArcGISRuntime.Mapping"
xmlns:toolkit="using:Esri.ArcGISRuntime.Toolkit.UI.Controls"
mc:Ignorable="d"
RequestedTheme="Light"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
<DataTemplate x:Key="ItemTemplateOne" x:DataType="mapping:Bookmark">
<TextBlock Text="{Binding Name}" HorizontalAlignment="Center" Foreground="Red" />
</DataTemplate>
<DataTemplate x:Key="ItemTemplateTwo" x:DataType="mapping:Bookmark">
<Grid Background="Red">
<TextBlock Foreground="White" Text="{Binding Name}" HorizontalTextAlignment="Center" HorizontalAlignment="Stretch" />
<TextBlock Foreground="{ThemeResource ApplicationForegroundThemeBrush}" Text="{Binding Name}" HorizontalTextAlignment="Center" HorizontalAlignment="Stretch" />
</Grid>
</DataTemplate>
<Style TargetType="Button">
Expand Down Expand Up @@ -99,7 +98,7 @@
Width="375"
Padding="10"
Margin="0,15, 15, 0"
Background="White" BorderBrush="Black" BorderThickness="1">
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" BorderBrush="{ThemeResource ApplicationForegroundThemeBrush}" BorderThickness="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:esri="using:Esri.ArcGISRuntime.UI.Controls"
xmlns:esriToolkit="using:Esri.ArcGISRuntime.Toolkit.UI.Controls"
mc:Ignorable="d"
RequestedTheme="Light">
mc:Ignorable="d">

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<esri:MapView Map="{x:Bind Map}" x:Name="mapView"/>

<Border HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10" Background="White" BorderBrush="Black" BorderThickness="1" Width="350">
<Border HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" BorderBrush="Black" BorderThickness="1" Width="350">
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
Expand All @@ -27,7 +26,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Text="Basic Scale Calculation" />
<esriToolkit:ScaleLine MapScale="{x:Bind mapView.MapScale, Mode=OneWay}" Grid.Row="1" />
<esriToolkit:ScaleLine MapScale="{x:Bind mapView.MapScale, Mode=OneWay}" Grid.Row="1" Foreground="{ThemeResource ApplicationForegroundThemeBrush}"/>
<TextBlock Text="" FontFamily="Segoe UI" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" FontSize="24">
<ToolTipService.ToolTip>
<TextBlock MaxWidth="300" TextWrapping="Wrap">
Expand All @@ -39,7 +38,7 @@
</TextBlock>

<TextBlock Text="Advanced Scale Calculation" Grid.Row="2" />
<esriToolkit:ScaleLine MapView="{x:Bind mapView}" Grid.Row="3" />
<esriToolkit:ScaleLine MapView="{x:Bind mapView}" Grid.Row="3" Foreground="{ThemeResource ApplicationForegroundThemeBrush}" />
<TextBlock Text="" FontFamily="Segoe UI" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" FontSize="24">
<ToolTipService.ToolTip>
<TextBlock MaxWidth="300" TextWrapping="Wrap">
Expand Down

0 comments on commit b10d385

Please sign in to comment.