BUG? buttons do not redraw?

Ribbon for WPF Forum

Posted 14 years ago by SledgeHammer01
Avatar
I'm using build 514 on XP fully patched. VS 2010 B2 (haven't put RC on this machine yet).

Seems like if I click on a button in the ribbon status bar, it sticks in the "hot" state even when I mouse off.

Here is my status bar XAML. I'm not doing anything in the code behind. When I click on the "Goto page" button and mouse off, it stays in the "hot state", same for the two repeat buttons on the slider. Not until I click on something else that takes focus do these 3 buttons redraw. The slider thumb works fine. The application button, etc. all seem to work fine too. I tried the sample browser document editor and it doesn't seem to have this problem, but I haven't really done anything, so I dunno whats causing it to stick in the hot state.




<ribbon:RibbonWindow.StatusBar>

<StatusBar>

<StatusBar.ItemsPanel>
<ItemsPanelTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
</Grid>
</ItemsPanelTemplate>
</StatusBar.ItemsPanel>

<StatusBarItem Grid.Column="0" Padding="3,0,0,0">
<ribbon:Button Context="StatusBarItem" Padding="6,0,6,0" Label="Page: 1 of 1"
ScreenTipHeader="Page number in document. Click to open the Go To dialog box." />
</StatusBarItem>

<Separator Grid.Column="1" />

<StatusBarItem Grid.Column="2" />

<Separator Grid.Column="3" Style="{StaticResource {x:Static ribbon:RibbonStyles.StatusBarSeparatorAlternateKey}}" />

<StatusBarItem Grid.Column="4" Padding="4,0,4,0" Style="{StaticResource {x:Static ribbon:RibbonStyles.StatusBarItemAlternateKey}}">

<StackPanel Orientation="Horizontal">

<ribbon:Button Context="StatusBarItem" Margin="0,1,0,1" Padding="6,0,6,0"
ScreenTipHeader="Zoom level. Click to open the Zoom dialog box."
Width="45"
Label="{Binding ElementName=scaleSlider, Path=Value}" />

<RepeatButton Name="Test" Margin="1,0,1,0" CommandTarget="{Binding ElementName=scaleSlider}" ribbon:ScreenTipService.ScreenTipHeader="Zoom Out"
Style="{StaticResource {x:Static ribbon:RibbonStyles.StatusBarSliderDecreaseButtonKey}}" />

<Slider x:Name="scaleSlider" Width="100" Value="90" Minimum="0" Maximum="180" LargeChange="10" SmallChange="10" VerticalAlignment="Center"
IsSnapToTickEnabled="True" TickFrequency="1" ribbon:ScreenTipService.ScreenTipHeader="Zoom" FocusVisualStyle="{x:Null}"
Style="{StaticResource {x:Static ribbon:RibbonStyles.StatusBarSliderKey}}" />

<RepeatButton Margin="1,0,1,0" CommandTarget="{Binding ElementName=scaleSlider}" ribbon:ScreenTipService.ScreenTipHeader="Zoom In"
Style="{StaticResource {x:Static ribbon:RibbonStyles.StatusBarSliderIncreaseButtonKey}}" />

</StackPanel>

</StatusBarItem>

</StatusBar>

</ribbon:RibbonWindow.StatusBar>

Comments (2)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi,

If you make the StatusBar a focus scope, focus will auto-jump back to the main area after button clicks. Something like this:
<StatusBar FocusManager.IsFocusScope="True">


Actipro Software Support

Posted 14 years ago by SledgeHammer01
Avatar
Ah... that fixed it. Guess I missed that tag in the copy & paste. Thanks!
The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.