Page 1 of 1

WPF Ribbon Control from Microsoft

Posted: Mon Aug 23, 2010 1:52 pm
by Dick Bowman
I stumbled across this http://10rem.net/blog/2010/08/02/announcing-microsoft-ribbon-for-wpf-rtw last week. Downloaded and confirmed rudimentary operation with Expression Blend (nearing the end of my free trial there).

Feedback suggests that there are acknowledged problems using it with Visual Studio Express. I'd wanted to follow my strategy of making some rough XAML with VSE, then trying to figure out what I need to change to make it work with Dyalog - but can't get through that first step.

Anyone got any experience they'd like to share?

Re: WPF Ribbon Control from Microsoft

Posted: Mon Aug 23, 2010 5:57 pm
by MikeHughes
Its still very new - I only downloaded it a week or so ago. At first glance I thought it looked very good - it seems to be the only one available that provides all the feaures - most of the commercial ones are missing some bits with promises to introduce the missing bits at their next release (though I wont be certain of that until I try it properly).
I am hoping to convert the example I showed at the BAA AGM to work with the new MS ribbon next week so I will have to wait until then to comment fully.

If my trials are successful - I will be including it in the Workshop in Berlin. So if you can bear with me for a week I will be in a better position to comment on it then.

Re: WPF Ribbon Control from Microsoft

Posted: Thu Sep 16, 2010 4:21 pm
by Dick Bowman
A partial answer to my own question...

Adding these lines to Jonathan's WPF Using function appears to let us use the Microsoft WPF Ribbon.

⍝ ------------- lines below should (?) access WPF ribbon
ribbonpath←'c:\program files (x86)\Microsoft Ribbon for WPF\v3.5.40729.1\'
use,←⊂'Microsoft.Windows.Controls.Ribbon,',ribbonpath,'RibbonControlsLibrary.dll'
use,←⊂'Microsoft.Windows.Shell,',ribbonpath,'Microsoft.Windows.Shell.dll'

My experiments so far have been both frustrating and rudimentary (but I've also been doing other stuff) - my very primitive ribbon displays the same in both Chash and APL/W 12.1 (32-bit and 64-bit).

The folder name looks suspicious, but that's where Microsoft installs the dlls for 64-bit Windows 7 - omit the (x86) for 32-bit. Hopefully they'll bring out a new version some day with a more logical folder (and naming) structure.

I shall experiment some more, but please don't hold your breath (and do feel free to jump in and save me the effort).

Re: WPF Ribbon Control from Microsoft

Posted: Wed Sep 22, 2010 3:52 pm
by Dick Bowman
Updating my fairly lonely little thread...

I've been experimenting with changing some little application UIs from Menubar/Toolbar to Ribbon over the past few days - most stuff seems to work, but I have one little foible that won't go away...

I have RibbonTabs specified with lines like this in my XAML file

<ribbon:RibbonTab Name="HomeTab" Header="Home" >

When the Window is first displayed only the first tab is visible, and has no header text shown. I can move my mouse to where tabs are "supposed to be" and everything works. If I manually resize the window (shrinking it so the Ribbon disappears, then expanding), the tab headers appear. And they seem to appear if I close the Window and repeat.

Here's a sample file I made earlier, which displays properly in VChash and show the strange behaviour with APL/W (12.1, 64-bit, patched this morning)...

<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" xmlns:my="http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon">
<Grid>
<my:Ribbon Height="153" HorizontalAlignment="Left" Margin="126,17,0,0" Name="ribbon1" VerticalAlignment="Top" Width="233">
<my:RibbonTab Header="Tab" Name="ribbonTab1" />
<my:RibbonTab Header="Tab" Name="ribbonTab2" />
</my:Ribbon>
</Grid>
</Window>

I'm not sure whether this is a Ribbon bug, or a ThickDickMissingATrick bug (if the latter I wonder whether there's another large chunk of WPF documentation I've got to read).

The Microsoft Ribbon discussion pages suggest that a new release will arrive soon, fixing some bugs, but I've seen no mention of this issue. Be pleased if anyone who has the Ribbon installed could confirm or deny what I'm seeing.

Re: WPF Ribbon Control from Microsoft

Posted: Thu Sep 23, 2010 7:19 am
by MikeHughes
Sorry to my no repying - I have ben away for a few days after Berlin so I have had limitied access to the internet and to email.

I still have to catch up on my dyalog forums but I noticed this problem with the ribbon.

There are some fixes due soon - this is "version 1" of the new ribbon - although I havent seen them yet myself there were rendering problems reported which I suspect this foible of yours is one example.

Re: WPF Ribbon Control from Microsoft

Posted: Wed Oct 27, 2010 2:12 pm
by Dick Bowman
A further update - there is a new version downloadable from Microsoft which seems to correct a heap of bugs (at first sight the "invisible tabs" seems to be one of them - although it was intermittent in the first place).

They are - in my opinion - making an almighty hash of delivering this, so...

0 - download the .msi file
1 - use the .msi file to uninstall the previous version, then install the new one (the repair option failed)
2 - restart your PC
3 - change your ⎕USING so that these lines replace my earlier suggestion (this for W7 64-bit, maybe different for 32-bit)...

ribbonpath←'c:\program files (x86)\Microsoft Ribbon for WPF\v4.0\'
use,←⊂'Microsoft.Windows.Controls.Ribbon,',ribbonpath,'RibbonControlsLibrary.dll'
shellpath←'c:\program files (x86)\Microsoft Ribbon for WPF\v3.5\'
use,←⊂'Microsoft.Windows.Shell,',shellpath,'Microsoft.Windows.Shell.dll'

4 - optionally (I've made this change, don't know what would have happened if I hadn't), add the <assembly=...> guff to the line in your XAML that says you're using the Ribbon...

xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"

That done, one of my exploratory WPF/Ribbon applications is restored to (basic) functionality - will report more in a day or so if I hit more issues.

Apart from Mike, is anyone else using this stuff? Anyone got strong feelings either way about Ribbon versus Menu/Toolbar? I'm finding that I can make my UI look a bit zingier - but I'm not exactly bowled over.