Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: File Browser from Property Grid

$
0
0
I am unable to get a file browser from the PropertyGrid in my WPF app.

I have a property grid in my WPF app.
<xctk:PropertyGrid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" AutoGenerateProperties="True" x:Name="PropertyGrid" SelectedObject="{settings:SettingBinding .}">
    </xctk:PropertyGrid>

My SettingsBidnings looks like this:
public class SettingBindingExtension : Binding
{
    public SettingBindingExtension()
    {
        Initialize();
    }

    public SettingBindingExtension(String path)
        : base(path)
    {
        Initialize();
    }

    private void Initialize()
    {
        Source = Properties.Settings.Default.Config;
        Mode = BindingMode.TwoWay;
    }
}
Any my settings class:
public class SyncSettings : IRemoteDataConfig
{
    [Category("Section 1")]
    [DisplayName("The File")]
    [Editor(typeof(System.Windows.Forms.Design.FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
    public String MyFile{ get; set; }

    [Category("Section 1")]
    [DisplayName("User")]
    public String MyUser{ get; set; }
}
By the 'The File' field in the property grid of my application is just treated like a simple string. It doesn't have a way to browse and select a file. What am I missing here?

~S

Viewing all articles
Browse latest Browse all 4964

Trending Articles



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