Problem with refresh: DocumentName and ApplicationName in title bar

Ribbon for WPF Forum

Posted 6 years ago by Marcin Szotka
Version: 12.2.0571
Environment: Windows 8 (64-bit)
Avatar

Hello

This is example:

 

<ribbon:RibbonWindow x:Class="TitleProblem.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"
                     DocumentName="{Binding DocName}"
                     ApplicationName="{Binding AppName}"
                     mc:Ignorable="d"
                     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                     SizeToContent="WidthAndHeight">

    <StackPanel>
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="Document name:"
                     Width="120" />
            <TextBox Text="{Binding DocName}"
                     MinWidth="120" />
        </StackPanel>
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="Application name:"
                     Width="120" />
            <TextBox Text="{Binding AppName}"
                     MinWidth="120" />
        </StackPanel>
    </StackPanel>
</ribbon:RibbonWindow>

 

ViewModel

 

class MainWindowViewModel : INotifyPropertyChanged
{     
   public const string AppNamePropertyName = "AppName";

   private string _appName = "";
      
   public string AppName
   {
      get
      {
         return _appName;
      }

      set
      {
         if (_appName == value)
         {
            return;
         }

         _appName = value;
         OnPropertyChanged(AppNamePropertyName);
      }
   }

   public const string DocNamePropertyName = "DocName";

   private string _docName = "";
      
   public string DocName
   {
      get
      {
         return _docName;
      }

      set
      {
         if (_docName == value)
         {
            return;
         }

         _docName = value;
         OnPropertyChanged(DocNamePropertyName);
      }
   }


   public event PropertyChangedEventHandler PropertyChanged;

   protected virtual void OnPropertyChanged(string propertyName)
   {
      var handler = PropertyChanged;
      if (handler != null)
      {
         handler(this, new PropertyChangedEventArgs(propertyName));
      }
   }
}

 

1) Change text in first TextBlock and exit control

2) Change text in second TextBlock and exit control

3) Titlebar is empy - why?

4) Resize window - now is OK.

 

Best regards - Marcin Szotka, InstalSoft

Comments (4)

Answer - Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Marcin,

Which exact build are you using?  I thought we had fixed that in build 572.


Actipro Software Support

Posted 6 years ago by Marcin Szotka
Avatar

We use "ActiproSoftware.Products.Ribbon.RibbonLicenseToken, ActiproSoftware.Ribbon.Wpf, Version=12.2.571.0", so I will check it.

Thank you for fast answer.

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

Ok good, I modified the build you entered in the original post so that other customers who run into this don't think it happened in build 572 as well.


Actipro Software Support

Posted 6 years ago by Marcin Szotka
Avatar

I checked, build 572 fixed this problem. Thank you.

The latest build of this product (v2018.1 build 0675) 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.