Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO: Prevent files from being shown in FileView

 
Subscribe to the RSS feed for this forum  Forum Index -> FileView.Net/WPF
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Fri Feb 06, 2009 10:37 am    Post subject: HOWTO: Prevent files from being shown in FileView

To prevent files from being shown in FileView, use the following code in the AfterItemAdd event:

[C#]
Code:
private void fileView_AfterItemAdd(object sender, LogicNP.FileViewControl.FileViewEventArgs e)
{
    if (!e.Item.IsFolder())
    {
        e.Item.Delete();
    }
}

[VB.Net]
Code:
Private Sub fileView_AfterItemAdd(ByVal sender As Object, ByVal e As LogicNP.FileViewControl.FileViewEventArgs) Handles fileView.AfterItemAdd

  If (e.Item.IsFolder() = False) Then
      e.Item.Delete()
  End If

End Sub
Back to top
Display posts from previous:   
Forum Index -> FileView.Net/WPF All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group