.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Standard WPF folder dialog to select folder

Posted By:      Posted Date: October 24, 2010    Points: 0   Category :WPF


I develop WPF4 application and in my app I need to let user to select a folder where aplication will store something (files, generated reports etc.).

My requirements:

— Ability to see standard folder tree

— Ability to select folder

— WPF look & feel, thid dialog must looks like part of modern application designed for Windows Vista/7 and not Windows 2000 or even Win9x.


As I understood, till 2010 (.Net 4.0) there is no standard folder dialog, but may be there is some changes in version 4.0?

Or all what rest to do is use old-scholl WinForms dialog? If it's the only way to do what I need so, how to make it closer to Vista/7 style and not Win9x?

On some formus I saw implementation of such dialogs but with old ugly icons a la Windows 95. It really doesn't look nice.




P.S. I hope to see standard folder WPF-dialog in .Net 4.0 SP1.

View Complete Post

More Related Resource Links

Standard layouts folder : after installing MOSS 2007 sp2


I have installed MOSS 2007 sp2 and would like to know when we install the SP2 will it make any changes to standard layouts folder (changes in any files).




Copying files to a folder on web server



I have few files in FolderA on the web server.

I want the users to select a fews files from FolderA and copy them to FolderB on the same web server.

I want to list all the files in FolderA and allow the user to select a few files and copy.

I want to copy the files programatically when the user selects a few files and click on Copy button.

How to copy the files quickly from folderA to FolderB?




Do not see the table in Database after moving the project folder



I created a ASP.NET project under Visual Web Developer 2008. Under that project I had a Database (along with ASPNETDB.MDF) which has about 3/4 tables (I had SQL server 2008). Everything was working fine (like insert, delete, etc.). And I was able to view the tables in database explorer view.

Then I had to format my computer for some reason and I copied the whole project in a USB drive and then after formatting the computer I copied the folder and tried to open it in Visual Web Developer (now I have VWD 2010). I can see the both Database under App_Data folder (ASPNETDB.mdf and the DB I created). ASPNETDB has all the tables and data as expected. But I do not see the tables under the DB I created.

I also tried in one of my friends computer who has Visual Web Developer 2008. But same result.

I am just wondering if anyone can help me with retreiving the table. I have a bad feeling that I might needed to do something to backup the data (not sure though). But the tables should be still there ... isn't it ?

Any help will be appreciated. Thank you in advance.

Exclude Folder from Website in Visual Studio


For projects such as forms apps and class libraries you can exclude folders which reside in the directory from the project. That menu option does not seem to exist when you create a website in VS 2005, is there any way to do it?



Access Classes in an aspx page that is in folder in asp.net


I have classes in App_Code:
Connection.cs, ClientData.cs ....

I have a folder Authenticated within it have an aspx page Client.aspx

How do I access the page through Client.aspx ClientData.cs the class, because there is a mistake for me to define the class as I do, please help me!

Cannot add an article to the specified folder



I've set up a sharepoint knowledgebase on my intranet site and all seemed fine.

The problem I have is that if I create a subfolder, I cannot create articles in that subfolder, as they appear in the root.


Steps taken:

  1. New|Folder - create a new folder in the knowledge base root
  2. Enter the folder
  3. New|Knowledge Base Article
  4. Verify that the path on the top of the new article edit page is "...Knowledge Base > New Folder"
  5. Save article
  6. Verify New Folder is empty and article can be found in the root of the knowledge base  

Uploading an article to the new folder is fine, as is editing/deleting the new folder itself.

Any ideas?



When try to open a folder in a moss 2007 document library in Explorer View, the folder does not open


When try to open a folder in a moss 2007 document library in Explorer View, the folder does not open.

I am using IE7 and the path of the folder does not contains more than 100 characters.

Also it opening on few on the machines which has IE7.


Changing folder name loses Person attributes


I have a custom folder content type. These folders have several attributes including text fields, choice, dates, and person lookups from AD. When I change the folder name, the folder will keep its date, choice and text box attributes, but lose the person attributes. If I change it back to its old name then it regains the person attributes. The ID is stays the same. One of the person fields is a required field, but that it still saves as an empty field. If anyone has a work around or even a suggestion as to what might be causing this it would help a lot.

navagation menu from folder structure?


Hello there,

If I have a folder structure that a user can place documents into, how do I create a navmenu that populates its  subfolder based on the contents of its corresponding subfolder in the folder structure? For instance if I have a menu item named "Forms" and I want it to get all the documents out of a folder named "Forms" (In which these documents are populated by a user placing them in there)


Hopefully I explained with enough detail, thanks for any help guys.




Access denied to folder in ASP.NET project either though I have granted all users full permissions !



i have made a very simple file upload app, that i want users to be able to upload images to a folder on my server, well localhost for the time being Stick out tongue

here is the simple upload code...

        protected void ButtonRegisterDetails_Click(object sender, EventArgs e) 
            // display properties of the uploaded file 

Create user is creating aspxxxx.mdf database in my app_data folder


I had already setup roles for my pages and requirements call for ability to manage and create users.

So i was looking at code that allows you to do so using membership, even though i got the page to work, it was creating a database in my app_data folder.. i already have SQLExpress setup with the asp schema, but cant figure out how to get my application to use that instead of creating the db in the folder?

What am i missing or doing wrong?

I have the following setup in my web.config file..

		<authentication mode="Windows"/>
			<deny users="?"/>
        <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Programmatically delete a .webpart file from wpcatalogs folder from an IIS website


We are using a third party wsp in our solution which directly adds the web parts into the web application store rather than the web part gallery(References to them are present in IIS site's wpcatalog directory). We want to remove these web part files so that the users will not be able to add these web parts to pages directly. Or any other modification so that users will not be able to add these directly. Is there a way we can do this programmatically?

Can i Map to external link from document library folder



Is There any one know how to link document library folder is to external site 



Partial Folder not working with Area.



I have the following on my Global.asax to define two partial folders: One in root and one in CMS area.

((CshtmlViewEngine)ViewEngines.Engines[1]).PartialViewLocationFormats = ((CshtmlViewEngine)ViewEngines.Engines[1]).PartialViewLocationFormats.Concat(new String[] { "~/Views/Partial/{0}.cshtml", "~/Areas/CMS/Views/Partial/{0}.cshtml" }).ToArray();

However when, in a CMS view, I render a partial view in CMS/Partial that has the same name as one in /Partial I get the one in Root/Partial.

I understand why ... It is the order of my Partial folders.

But can I have all views in CMS to render partials from CMS/Partial and the views in root to render partial views from /Partial?



When i click on any other folder in the document library that will navigate to default view of DL?



I have document library with having some folder in the same ,i have displayed my library in the page as Treeview, so when i click on any of the folder in the library i need to navigate allitems.aspx page i.e default view page of the document library ,the document library having views.Suppose when i am in other view i have selected folder from library treeview folder is changing but view not navigate to default view.

pls help 


How to restrict folder access to users and theirs only


Hi. I created a web application using "Forms Authentication". 

There is a folder name "uploads", and it creates subfolders as username when they register. Web application stores users' files and images under their folder ("uploads/username")

I tried to find a way to restrict users to download and upload files to their folder only and couldn't find a good one. 

Then I came up with this idea that stores "web.config" file each time user registers and the web.config should look like below. Username will be changed dynamically according to username.

This method actually works but I am little worried if this is a good practice as far as performance wise. Because it'll create web.config files as many as users and there might be other holes that I don't recognize. 

I appreciate any advice or better suggestion for this problem.

--------web.config in "/Root/uploads/username directory"--------------

<location path="HRpages">

How to use Resource files added to Resources Folder ?



I have added .CSS file in Resources folder of the project.In the same way i can add Images or any other files.But i am unable to use those files in Server Control Project.How to apply CssClass property to any predefined server control to the css file that is stored in the Resources folder  ?

Please guide how to use those Resource files . 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend