<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A Custom UITypeEditor for Activity Properties</title>
	<atom:link href="http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties/feed" rel="self" type="application/rss+xml" />
	<link>http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties</link>
	<description>by dæmons be driven</description>
	<lastBuildDate>Tue, 16 Mar 2010 06:33:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Joao Livio</title>
		<link>http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties/comment-page-1#comment-1266</link>
		<dc:creator>Joao Livio</dc:creator>
		<pubDate>Tue, 19 Jan 2010 16:30:16 +0000</pubDate>
		<guid isPermaLink="false">http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties#comment-1266</guid>
		<description>Good Solution!
Thanks

&#039;VB.NET Code

Imports System
Imports System.ComponentModel
Imports System.Drawing.Design
Imports System.IO
Imports System.Windows.Forms
Imports System.Windows.Forms.Design

Public Class SelectorTypeFileDialog
    Public Class FileSelectorTypeEditor
        Inherits UITypeEditor

        Public Overloads Overrides Function GetEditStyle(ByVal context As ITypeDescriptorContext) As UITypeEditorEditStyle
            If context Is Nothing OrElse context.Instance Is Nothing Then
                Return MyBase.GetEditStyle(context)
            End If
            Return UITypeEditorEditStyle.Modal
        End Function

        Public Overloads Overrides Function EditValue(ByVal context As ITypeDescriptorContext, ByVal provider As IServiceProvider, ByVal value As Object) As Object
            Dim editorService As IWindowsFormsEditorService

            If context Is Nothing OrElse context.Instance Is Nothing OrElse provider Is Nothing Then
                Return value
            End If

            Try
                &#039; get the editor service, just like in windows forms
                editorService = DirectCast(provider.GetService(GetType(IWindowsFormsEditorService)), IWindowsFormsEditorService)

                Dim dlg As New OpenFileDialog()
                dlg.Filter = &quot;All Files (*.*)&#124;*.*&quot;
                dlg.CheckFileExists = True

                Dim filename As String = DirectCast(value, String)
                If Not File.Exists(filename) Then
                    filename = Nothing
                End If
                dlg.FileName = filename

                Using dlg
                    Dim res As DialogResult = dlg.ShowDialog()
                    If res = DialogResult.OK Then
                        filename = dlg.FileName
                    End If
                End Using

                Return filename
            Finally
                editorService = Nothing
            End Try
        End Function
    End Class
End Class</description>
		<content:encoded><![CDATA[<p>Good Solution!<br />
Thanks</p>
<p>&#8216;VB.NET Code</p>
<p>Imports System<br />
Imports System.ComponentModel<br />
Imports System.Drawing.Design<br />
Imports System.IO<br />
Imports System.Windows.Forms<br />
Imports System.Windows.Forms.Design</p>
<p>Public Class SelectorTypeFileDialog<br />
    Public Class FileSelectorTypeEditor<br />
        Inherits UITypeEditor</p>
<p>        Public Overloads Overrides Function GetEditStyle(ByVal context As ITypeDescriptorContext) As UITypeEditorEditStyle<br />
            If context Is Nothing OrElse context.Instance Is Nothing Then<br />
                Return MyBase.GetEditStyle(context)<br />
            End If<br />
            Return UITypeEditorEditStyle.Modal<br />
        End Function</p>
<p>        Public Overloads Overrides Function EditValue(ByVal context As ITypeDescriptorContext, ByVal provider As IServiceProvider, ByVal value As Object) As Object<br />
            Dim editorService As IWindowsFormsEditorService</p>
<p>            If context Is Nothing OrElse context.Instance Is Nothing OrElse provider Is Nothing Then<br />
                Return value<br />
            End If</p>
<p>            Try<br />
                &#8216; get the editor service, just like in windows forms<br />
                editorService = DirectCast(provider.GetService(GetType(IWindowsFormsEditorService)), IWindowsFormsEditorService)</p>
<p>                Dim dlg As New OpenFileDialog()<br />
                dlg.Filter = &#8220;All Files (*.*)|*.*&#8221;<br />
                dlg.CheckFileExists = True</p>
<p>                Dim filename As String = DirectCast(value, String)<br />
                If Not File.Exists(filename) Then<br />
                    filename = Nothing<br />
                End If<br />
                dlg.FileName = filename</p>
<p>                Using dlg<br />
                    Dim res As DialogResult = dlg.ShowDialog()<br />
                    If res = DialogResult.OK Then<br />
                        filename = dlg.FileName<br />
                    End If<br />
                End Using</p>
<p>                Return filename<br />
            Finally<br />
                editorService = Nothing<br />
            End Try<br />
        End Function<br />
    End Class<br />
End Class</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Custom editors for Windows workflow activity properties &#171; Hendrik Swanepoel&#8217;s Blog</title>
		<link>http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties/comment-page-1#comment-1244</link>
		<dc:creator>Custom editors for Windows workflow activity properties &#171; Hendrik Swanepoel&#8217;s Blog</dc:creator>
		<pubDate>Thu, 26 Nov 2009 06:51:10 +0000</pubDate>
		<guid isPermaLink="false">http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties#comment-1244</guid>
		<description>[...] I remembered that I&#8217;ve done it several times, but hey 2.5 years is a looong time in which to forget stuff like this.. Luckily I found a real nice example on how to do this in this post by Tomas Restrepo: http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties/comment-page-1. [...]</description>
		<content:encoded><![CDATA[<p>[...] I remembered that I&#8217;ve done it several times, but hey 2.5 years is a looong time in which to forget stuff like this.. Luckily I found a real nice example on how to do this in this post by Tomas Restrepo: <a href="http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties/comment-page-1" rel="nofollow">http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties/comment-page-1</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aks</title>
		<link>http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties/comment-page-1#comment-1219</link>
		<dc:creator>aks</dc:creator>
		<pubDate>Thu, 12 Nov 2009 13:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties#comment-1219</guid>
		<description>Thank&#039;s a lot! 
It works :)</description>
		<content:encoded><![CDATA[<p>Thank&#8217;s a lot!<br />
It works <img src='http://winterdom.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kenny james</title>
		<link>http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties/comment-page-1#comment-1187</link>
		<dc:creator>kenny james</dc:creator>
		<pubDate>Thu, 29 Oct 2009 22:32:58 +0000</pubDate>
		<guid isPermaLink="false">http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties#comment-1187</guid>
		<description>Again, i converted it to VB.NET. May be because i used Overloads instead of overrides. Vb wont let me overrides it GetEditStyle and EditValue then i switched it to overloads method

Can you comment on that please

kenny</description>
		<content:encoded><![CDATA[<p>Again, i converted it to VB.NET. May be because i used Overloads instead of overrides. Vb wont let me overrides it GetEditStyle and EditValue then i switched it to overloads method</p>
<p>Can you comment on that please</p>
<p>kenny</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kenny james</title>
		<link>http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties/comment-page-1#comment-1186</link>
		<dc:creator>kenny james</dc:creator>
		<pubDate>Thu, 29 Oct 2009 22:27:32 +0000</pubDate>
		<guid isPermaLink="false">http://winterdom.com/2006/08/acustomuitypeeditorforactivityproperties#comment-1186</guid>
		<description>I try this but it doesn&#039;t work. I created a separate class library, compiled it to .NET assembly (Dll file) then reference it in windows Form application. The program runs without error, the dialog does not show. 

Please can you explain it again.</description>
		<content:encoded><![CDATA[<p>I try this but it doesn&#8217;t work. I created a separate class library, compiled it to .NET assembly (Dll file) then reference it in windows Form application. The program runs without error, the dialog does not show. </p>
<p>Please can you explain it again.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
