Access Window of modal PropertyGrid.Editor

2 posts, 0 answers
  1. O
    O avatar
    3 posts
    Member since:
    Jan 2015

    Posted 03 Aug 2016 Link to this post


    I'm looking at your demo for the PropertyGrid Editor Attribute. MapEditorControl.xaml is a UserControl which is set as an editor in Employee.cs using

            [Telerik.Windows.Controls.Data.PropertyGrid.Editor(typeof(MapEditorControl), "Location", Telerik.Windows.Controls.Data.PropertyGrid.EditorStyle.Modal),]
            public string Location
                    return this.location;
                    if (this.location != value)
                        this.location = value;


    However, when you run the demo the UserControl MapEditorControl sits inside another Window (see attached image). How do I access this window to set header text, icons and themes?

    Based on the demo it seems I can only access the UserControl and so any implicit themes will only work from here onward and not on it's parent window.



  2. Yoan
    Yoan avatar
    1128 posts

    Posted 05 Aug 2016 Link to this post


    In order to achieve your goal, you can use the Loaded event of your UserControl and find its parent (the window). Please check the following code snippet for a reference:
    UserControl x:Class="RadGridView_WPF_AR_88.UserControl1"
     using Telerik.Windows.Controls;
     public partial class UserControl1 : UserControl
            public UserControl1()
            private void UserControl_Loaded(object sender, RoutedEventArgs e)
                var window = this.ParentOfType<Window>();
                if (window != null)
                    window.Title = "Some Title";

    I hope this helps.

    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top