New to Telerik UI for WPFStart a free 30-day trial

Design-Time Error is Displayed when Setting the GuidItem Property in XAML

Updated on Sep 15, 2025

Environment

Product Version2024.3.806
ProductRadNotifyIcon for WPF

Description

Setting the GuidItem property of the RadNotifyIcon control displays a design-time error.

Solution

The design-time error can come from setting a value to the GuidItem property, which is not of the type of Guid.

To prevent the error from being raised, you can define the value as a resource and use a converter to convert it to a new Guid instance.

The following example showcases this approach:

Defining the Guid value as a resource

XAML
    <Grid>
        <Grid.Resources>
            <local:StringToGuidConverter x:Key="StringToGuidConverter"/>
            <sys:String x:Key="MyGuidString">6e39f786-db66-42ad-987a-628e1bcb3376</sys:String>
        </Grid.Resources>
        <telerik:RadNotifyIcon GuidItem="{Binding Source={StaticResource MyGuidString}, Converter={StaticResource StringToGuidConverter}}"/>
    </Grid>

Implementing the converter

C#
    public class StringToGuidConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return Guid.Parse(value.ToString());
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support