Skip to content

update of MainWindowTitle #1074

Open
Open
@TimmHamburg

Description

@TimmHamburg

The content of MainWindowTitle didn't changed after first access?

If i open an application and get the MainWindowTitle after 5 seconds the title contains the application name
But if i request the MainWindowTitle after a few milliseconds after opening the title is empty and will stay empty also after 5 seconds!

workaround:

var title = infologgerProcess.MainWindowTitle;
var processlist = Process.GetProcessesByName("InfoLogger");
foreach (Process process in processlist.Where(process => process.Id == infologgerProcess.Id))
{
if (!title.Equals(process.MainWindowTitle))
{
Debug.WriteLine($"change title from infologgerProcess.MainWindowTitle '{infologgerProcess.MainWindowTitle}' to process.MainWindowTitle '{process.MainWindowTitle}' );
title = process.MainWindowTitle;
}
}

resulting debug log:
change title from infologgerProcess.MainWindowTitle '' to process.MainWindowTitle 'Please wait while the application opens'
change title from infologgerProcess.MainWindowTitle '' to process.MainWindowTitle 'ServiceConnect InfoLogger'
change title from infologgerProcess.MainWindowTitle '' to process.MainWindowTitle 'InfoLogger - loading ...
change title from infologgerProcess.MainWindowTitle '' to process.MainWindowTitle 'InfoLogger - Zeus_IE_ASFB-0024_10040_07eda5ba25ad.gsr'


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions