RibbonWindow.ApplicationName glowing issues w/GlassEnabled

Ribbon for WPF Forum

Posted 14 years ago by Jon Cain - Software Architect, AutoMon Corporation
Version: 10.1.0520
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Avatar
If you have a RibbonWindow (glass enabled) with an ApplicationName that is bound to a property on the data context, the glowing does not update when the property changes. This causes a strange behavior where the glowing outlines the text as it was when the window loaded rather than what the text was changed to. Now, if you resize the window, the glowing recalcuates, but unfortunately it does not recalculate when the dependency property changes.

Here's some code that demonstrates the problem:

MainWindow.xaml:

<ribbon:RibbonWindow
  x:Class="RibbonWindowGlow.MainWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
  ApplicationName="{Binding WindowTitle}" Height="350" Width="525">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto" />
      <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    
    <Label>Change Window Title</Label>
    <TextBox Grid.Column="1" Text="{Binding WindowTitle, UpdateSourceTrigger=PropertyChanged}" />
    <StackPanel VerticalAlignment="Top" Margin="5" Grid.Row="1" Grid.ColumnSpan="2" >
      <TextBlock>1. Resize Window, Glowing is fixed</TextBlock>
      <TextBlock>2. Change Title, glowing remains as it was with old title value</TextBlock>
    </StackPanel>
  </Grid>
</ribbon:RibbonWindow>
MainWindow.xaml.cs

using System.ComponentModel;
using ActiproSoftware.Windows.Controls.Ribbon;

namespace RibbonWindowGlow
{
   public partial class MainWindow : RibbonWindow, INotifyPropertyChanged
   {
      private string windowTitle;

      public MainWindow()
      {
         InitializeComponent();
         this.DataContext = this;
         this.Loaded += (sender, e) => WindowTitle = "Delayed Window Title";
      }

      public string WindowTitle
      {
         get { return windowTitle; }
         set
         {
            if (value != windowTitle)
            {
               this.windowTitle = value;
               PropertyChanged(this, new PropertyChangedEventArgs("WindowTitle"));
            }
         }
      }

      public event PropertyChangedEventHandler PropertyChanged = delegate { };
   }
}
[Modified at 04/14/2010 01:38 PM]

Comments (1)

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

Thanks for notifying us of this. We'll get it fixed and will try and have a new build in the next few days.


Actipro Software Support

The latest build of this product (v24.1.2) was released 4 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.