Предоставление значения для system windows markup staticresourceholder вызвало исключение

Download version 5.1 to use with my .Net 6 wpf Application, and when I try to use the binocullars to inspect the application it crashes with this exception. I tried version 5.0 and got the same error.


System.Windows.Markup.XamlParseException
HResult=0x80131501
Message=Provide value on ‘System.Windows.Markup.StaticResourceHolder’ threw an exception.
Source=PresentationFramework
StackTrace:
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) in System.Windows.Markup\XamlReader.cs:line 401

This exception was originally thrown at this call stack:
System.Windows.StaticResourceExtension.ProvideValue(System.IServiceProvider) in StaticResourceExtension.cs
MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(System.Windows.Markup.MarkupExtension, System.IServiceProvider)

Inner Exception 1:
Exception: Cannot find resource named ‘UIShape.Right.Office2019Black’. Resource names are case sensitive.


  • Snoop v5.1 and 5.0
  • Windows 11
  • .NET 6

Hema
asked on 09 May 2016, 08:54 AM

I have added the ImageEditor UI control in My XMAL window and got below error in runtime. i dont have any clue on this issue. i added all libraries based on sample program ; but its not working

OS : Windows 10

IDE: Viusal studio 2015 

Added Reference below Lib: Telerik.Windows.Controls version (2016.1.217.40)

Telerik.Windows.Controls.ImageEditor(2016.1.217.40)

Telerik.Windows.Controls.Navigation

Details Error Message:

xmlns:telerik=»http://schemas.telerik.com/2008/xaml/presentation» xmlns:tools=»clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor» xmlns:commands=»clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor»

//My XAML code 

<UserControl x:Class=»Aagnaa_ImageEditor.ImageProcessngView»
             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:local=»clr-namespace:Aagnaa_ImageEditor»
             xmlns:telerik=»http://schemas.telerik.com/2008/xaml/presentation»
            xmlns:tools=»clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor»
            xmlns:commands=»clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor»
            xmlns:converters=»clr-namespace:Aagnaa_ImageEditor.Converters»
            xmlns:views=»clr-namespace:Aagnaa_ImageEditor.Views»
             mc:Ignorable=»d» 
             d:DesignHeight=»600″ d:DesignWidth=»1300″>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width=»300″></ColumnDefinition>
            <ColumnDefinition Width=»*»></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <!—<views:CropedImageView Grid.Column=»0″ x:Name=»croppedFinalView»></views:CropedImageView>—>
        <Grid Grid.Column=»1″>
            <Grid.RowDefinitions>
                <RowDefinition Height=»*»></RowDefinition>
                <RowDefinition Height=»300″></RowDefinition>
            </Grid.RowDefinitions>
            <!—image Editor for Post processing—>
            <telerik:RadImageEditorUI  Margin=»8″/>

            <!—Processing Controls—>

        </Grid>
    </Grid>
</UserControl>

             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:local=»clr-namespace:Aagnaa_ImageEditor»
             xmlns:telerik=»http://schemas.telerik.com/2008/xaml/presentation»
            xmlns:tools=»clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor»
            xmlns:commands=»clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor»
            xmlns:converters=»clr-namespace:Aagnaa_ImageEditor.Converters»
            xmlns:views=»clr-namespace:Aagnaa_ImageEditor.Views»
             mc:Ignorable=»d» 
             d:DesignHeight=»600″ d:DesignWidth=»1300″>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width=»300″></ColumnDefinition>
            <ColumnDefinition Width=»*»></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <!—<views:CropedImageView Grid.Column=»0″ x:Name=»croppedFinalView»></views:CropedImageView>—>
        <Grid Grid.Column=»1″>
            <Grid.RowDefinitions>
                <RowDefinition Height=»*»></RowDefinition>
                <RowDefinition Height=»300″></RowDefinition>
            </Grid.RowDefinitions>
            <!—image Editor for Post processing—>
            <telerik:RadImageEditorUI  Margin=»8″/>

            <!—Processing Controls—>

        </Grid>
    </Grid>
</UserControl>

Let me know if its common issue?

Regards

Hema

Getting below error while using GridSplitter in WPF UserControl.

System.Windows.Markup.XamlParseException: »Provide value on ‘System.Windows.Markup.StaticResourceHolder’ threw an exception.’ Line number ’25’ and line position ’12’.’

Exception: Cannot find resource named ‘FabricGridSplitter’. Resource names are case sensitive.

Code is below:

  <GridSplitter Grid.Column=»1″ Width=»2″ HorizontalAlignment=»Center»   
            VerticalAlignment=»Stretch» Background=»Black»></GridSplitter>

Answers (4)

tags: WPF  abnormal

Abnormal background:

   When WPF was first developed, all resources were defined in the App.xaml file. With the increase of project resources, it is very troublesome to view and modify resources. It is the way of integrating resource dictionary in App.xaml.

Abnormal:

   When defining resources in App.xaml, I write all the classes that need to be used in the project on the top   

<Application.Resources>
  <app:ColorCollection_Column x:key="C_CCC"/>
  ...
</Application.Resources>       

App.xaml

   When integrating resource fields in App.xaml, I separate Class from other resources

<ResourceDictionary 
    xmlns:app ="clr-namespace:TZCloud"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <app:ColorCollection_Column x:Key="C_CCC"/>
</ResourceDictionary>

Resource Dictionary-Class

<ResourceDictionary 
    xmlns:app ="clr-namespace:TZCloud"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    ...
</ResourceDictionary>

Resource Dictionary-Other

<Application.Resources>
  <ResourceDictionary >
    <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="Dictionary\Other.xaml"/>
      <ResourceDictionary Source="Dictionary\Class.xaml"/>              
    </ResourceDictionary.MergedDictionaries>
  </ResourceDictionary>
</Application.Resources>   

   Because the Class resource declaration comes after, and other resource declarations (the resource has a reference to the Class resource) come first, an error is reported.


Intelligent Recommendation

More Recommendation

Exception thrown when Spark runs in yarn mode

An exception is thrown when Spark runs in yarn mode: cluster.YarnClientSchedulerBackend: Yarn application has already exited with state FINISHED! solution: The main reason is that the memory allocated…

I’m getting the following exception when I drop a datetimepicker on my form. Other actipro controls seem to be ok:

{«Provide value on ‘System.Windows.Markup.StaticResourceHolder’ threw an exception.»}

Inner: {«Cannot find resource named ‘TargetType=ActiproSoftware.Windows.Controls.PopupButton ID=PopupButtonAeroNormalColorStyle’. Resource names are case sensitive.»}

Any pointers appreciated.

BaseUri: {pack://application:,,,/ActiproSoftware.Editors.Wpf351;component/Themes/Editors/Controls/PopupButton/AeroNormalColor.xaml}

Comments (1)

Hi Jonathan,

I’m assuming you mean DateTimeEditBox from our Editors for WPF product, as the DateTimePicker is a deprecated control in our shared library. We haven’t had any reports of problems using DateTimeEditBox like you describe. Please make sure you are referencing both ActiproSoftware.Editors.Wpf351 and ActiproSoftware.Shared.Wpf351, as the PopupButtonAeroNormalColorStyle is defined in the Shared assembly.

If that doesn’t help please put together a small sample project that reproduces the issue and email it over to our support address. Once we have that we can take a closer look.


The latest build of this product (v24.1.5) was released 2 months ago,
which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Взаимодействие между процессами windows
  • Контроль активности приложений windows
  • Как посмотреть имя пользователя компьютера windows 10
  • Как сделать диск основным разделом в windows 10
  • Как очистить оперативную память на ноутбуке 10 виндовс windows от мусора