Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

LargeImageSource Throwing Exception

$
0
0

New to XAML so please be gentle. I am trying to create a simple Ribbon in VS and have written this code:

<RibbonWindow x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
        Title="MainWindow"
        x:Name="RibbonWindow"
        Width="640" Height="480"><Grid x:Name="LayoutRoot"><Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition Height="*"/></Grid.RowDefinitions><Ribbon x:Name="Ribbon" Title="Ribbon Title"><r:RibbonGroup Name="Test" ><r:RibbonButton Width="100" Background="Azure" Height="100" /><r:RibbonButton x:Name="RibbonButton" Label="Button" LargeImageSource="Images/Test.jpg"></r:RibbonButton></r:RibbonGroup></Ribbon></Grid></RibbonWindow>

It renders fine in the designer but when I run the project I get an exception:

An unhandled exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll

Additional information: 'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '18' and line position '55'.

If there is a handler for this exception, the program may be safely continued.


I have no idea why. I have tried changing the image to no avail and deleting certain types of code but the only thing that make the project run is when I delete LargeImageSource.

Any help would be appreciated.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>