What with: The resource "Esri_Button" could not be resolved.?

794
2
05-03-2022 11:13 PM
DavidMrázek
Occasional Contributor II

Hi, I'm working on ArcGIS Pro Dockpane.

XAML:

<UserControl x:Class="Projekt.SelectedLineLengthDockpaneView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"   
             xmlns:ui="clr-namespace:Projekt"
             xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             d:DataContext="{Binding Path=ui.SelectedLineLengthDockpaneViewModel}">
     <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Button Grid.Row="1" Command="{Binding CmdSelection}" Margin="5" Content="Zvol linii" 
                Style="{DynamicResource Esri_Button}" />//here is warnings
        <Button Grid.Row="2" Command="{Binding CmdShowSelectedLines}" Margin="5" Content="Načíst tabulku" 
                FrameworkElement.Style="{DynamicResource Esri_Button}" />//here is warnings
        <DataGrid Grid.Row="3" Margin="5" HeadersVisibility="Column" IsReadOnly="True"
                  ItemsSource="{Binding Path=LineSelectionSet}" 
                  SelectionMode="Single" SelectionUnit="FullRow" 
                  Style="{DynamicResource Esri_DataGrid}" AutoGenerateColumns="True" 
                  SelectedItem="{Binding LineSelection}" HorizontalAlignment="Stretch">//here is warnings
        </DataGrid>
        <Grid Grid.Row="4" Margin="5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="Celková délka [m]:" Style="{DynamicResource Esri_TextBlockH3}" />//here is warnings
            <TextBox Grid.Column="1" Text="{Binding TotalResult}" TextAlignment="Right" IsReadOnly="True" HorizontalAlignment="Stretch"/>
        </Grid>
    </Grid>
</UserControl>

And I don't know about this at all:

the res.png

Has it happened to someone or does anyone have experience with it?

Thank you for the advice.

David

 

0 Kudos
2 Replies
GKmieliauskas
Esri Regular Contributor
0 Kudos
Cristian_Galindo
Occasional Contributor III

I do not understand the idea behind 

extensions:DesignOnlyResourceDictionary 

 

if you can not used it in design time, because it will not be loaded.