Backstage menus?

Aug 13, 2010 at 1:01 PM

Hi,

 

Where can I find some example templates or help for creating backstage menus?

 

Particularly the 'Recent Items' & Help menus in Word 2010.

 

Thanks!

Aug 14, 2010 at 10:09 AM
?
Aug 16, 2010 at 12:46 PM
daVinci, please assist :)
Coordinator
Aug 16, 2010 at 1:47 PM

There are no such examples yet

Aug 16, 2010 at 6:38 PM

There's the example I posted here: http://fluent.codeplex.com/Thread/View.aspx?ThreadId=214848

Tim

Aug 17, 2010 at 8:40 AM

Thanks Tim, I'd already used your example to create a help menu! :)

 

Can you provide any assistance in creating a 'Recent Items' backstage menu as in Word 2010?

Aug 17, 2010 at 9:57 AM

Well, I can't vouch for Word2010, but what I did was create a UserControl that contains an icon, the file name and path (similar to the buttons I built in the other example), and populated a borderless ListBox with those UserControls.

 

<StackPanel Margin="20,5,0,5">
    <Label Foreground="DimGray" FontWeight="Bold" FontSize="14">Recent Files</Label>
    <ListBox Name="lstRecentFiles"  Width="300" IsEnabled="False" BorderThickness="0" SelectionChanged="lstRecentFiles_SelectionChanged" >
        <ListBoxItem>
            <Label>There are no recent files.</Label>
        </ListBoxItem>
    </ListBox>
</stackPanel>

Further buttons can be added to the stack to operate the OpenFile dialog etc.

private void SetMRUList()
{
    mMRU.ReadMRUlist();
    lstRecentFiles.Items.Clear();
    if (mMRU.Count > 0)
    {
        lstRecentFiles.IsEnabled = true;
        for (int i = 0; i < 8; i++)
        {
            if (i < mMRU.Count)
            {
                ucMRUListItem mruItem = new ucMRUListItem(((MostRecentFile)mMRU[i]).FullName);
                lstRecentFiles.Items.Add(mruItem);
            }             
        }
    }
    else
    {
        lstRecentFiles.Items.Add("There are no recent files.");
        lstRecentFiles.IsEnabled = false;
    }
}

Aug 17, 2010 at 1:32 PM

Thanks very much Tim!! :)

 

Could you post a screenshot, if you have one, of what a full list of recent items will look like? I've got the code into my ribbon, but I can't see how it will look WITH recent items, as I don't have that functionality programmed yet (all I can see is the 'there are no recent items' text. Or perhaps, how might I manually add recent items to see how it will look?

 

Thanks!