EternalDOOM

DynamicResource Esri Expander Styles Ignoring Theme Settings

Discussion created by EternalDOOM on Aug 19, 2019
Latest reply on Aug 26, 2019 by gkmieliauskas_cellexp

Hello,

 

this time I'm having trouble with applying predefined Esri Styles to my Controls (Expander and TextBlock). It ignores the ArcGIS Pro theme settings and always shows light theme font colors also in dark theme mode, see picture:

 

 

 

Is there any cache folder for the add-in that I can delete/remove?

 

I'm still on ArcGIS Pro 2.1.

 

<Expander Header="Kurs zum Ziel" HorizontalAlignment="Stretch" 
          VerticalAlignment="Top" Grid.Row="3"
          Grid.ColumnSpan="5" Margin="0,0,10,0" Height="125"
          IsExpanded="{Binding CourseToTargetExpanded}"
          Style
="{DynamicResource Esri_Expander}"
IsEnabled="{Binding HasNavigation}">

    <Grid x:Name="courseGrid" Margin="2,2,2,2" >
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="95" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="0.5*" />
        <ColumnDefinition Width="0.5*" />
        <ColumnDefinition Width="0.5*" />
        <ColumnDefinition Width="0.5*" />
    </Grid.ColumnDefinitions>
    <Label x:Name="lblTargetCourse" Content="Soll-Kurs: " Grid.Row="0" Grid.Column="0" />
    <TextBlock x:Name="tbxTargetCourse" Text="{Binding TargetCourse}"
        Grid.Row="0" Grid.Column="1"
        VerticalAlignment="Center" Padding="5,0,0,0"
        Style
="{DynamicResource Esri_TextBlockDockPaneHeading}"
/>

    <Label x:Name="lblDistance" Content="Abstand: " Grid.Row="0" Grid.Column="2" />
    <TextBlock x:Name="tbxDistance" Text="{Binding TargetDistance}"
        Grid.Row="0" Grid.Column="3"
        VerticalAlignment="Center" Padding="5,0,0,0" Margin="0,5"
        Foreground="{DynamicResource Esri_TextStyleDefaultBrush}" />

    <Canvas VerticalAlignment="Center" x:Name="liveCourse" Grid.Row="1"
        Height="15" Grid.Column="0" Width="{Binding CanvasWidth, Mode=TwoWay}"
        Grid.ColumnSpan="4" SizeChanged="GpsModule_LiveCourseCanvas_SizeChanged">

        <Rectangle x:Name="liveCourseLeft" Fill="#E50000" Height="15"
            Width="150" Canvas.Bottom="25"/>

        <Rectangle x:Name="liveCourseRight" Fill="#00CC00" Height="15"
            Canvas.Left="150" Canvas.Bottom="25" Width="150"/>

        <TextBlock x:Name="liveCourseMarker" Text="^" FontSize="26"
            Canvas.Bottom="10" Canvas.Left="{Binding LiveMarkerPosition}"
            FontFamily="Arial" Foreground="White">
</TextBlock>
     </Canvas>
     </Grid>
</Expander>

 

Does anyone have an idea?

Outcomes