The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
[uwp] How to create tile with folder from my app ? RRS feed

  • Question

  • I can view folders from my app.

    I want user used menu create tile on main screen for folder.

    And then when he clicked on folder tile my app will open with this folder.

    How ?


    • Edited by SmartWhy Thursday, December 22, 2016 10:56 AM
    Thursday, December 22, 2016 10:55 AM

Answers

All replies

  • Create Folder:

    ApplicationData.Current.LocalFolder.CreateFolderAsync("Data");

    Reference:

    https://msdn.microsoft.com/en-us/library/windows/apps/br227257.aspx

    First, we can make the project folder:
    
    StorageFolder rootFolder = ApplicationData.Current.LocalFolder;
    var projectFolderName = "Project1";
    StorageFolder projectFolder = await rootFolder.CreateFolderAsync(projectFolderName, CreationCollisionOption.ReplaceIfExisting);
    Then, you can create your file within your subfolder:
    
    StorageFile sampleFile = await projectFolder.CreateFileAsync("sample.txt");

    Hope that helps.

    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.


    Thursday, December 22, 2016 11:19 AM
  • No, i don't want to create a folder.

    I want to create tile on the screen from app.

    Thursday, December 22, 2016 5:38 PM
  • Hello SmartWhy,

    I'm not so sure whether your tile means this:

    But if you mean this tile, I'm afraid you cannot add a "folder" in this tile. We can only do the following:

    1. For tiles and adaptive tiles we can only add images and texts on it, see here

    2. Handle the active action of our tile so that we may be able to navigate to a specific page:

    We cannot create folders on tile.

    Best regards,

    Barry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 23, 2016 5:31 AM
    • Marked as answer by SmartWhy Friday, December 23, 2016 10:34 AM
    • Edited by SmartWhy Friday, December 23, 2016 10:34 AM
    Friday, December 23, 2016 10:34 AM
  • Hello SmartWhy,

    Thanks for sharing. I didn't realize that you are saying that in phone we can create a folder to combine some tiles together.   :)

    Best regards,

    Barry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 23, 2016 10:56 AM