Sicherung
This commit is contained in:
@@ -19,7 +19,7 @@ namespace FSI.BT.Tools.Commands
|
||||
/// <summary>
|
||||
/// A singleton instance.
|
||||
/// </summary>
|
||||
private static T? command;
|
||||
private static T command;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a shared command instance.
|
||||
@@ -83,7 +83,7 @@ namespace FSI.BT.Tools.Commands
|
||||
/// </summary>
|
||||
/// <param name="commandParameter"></param>
|
||||
/// <returns>Window</returns>
|
||||
protected Window? GetTaskbarWindow(object commandParameter)
|
||||
protected Window GetTaskbarWindow(object commandParameter)
|
||||
{
|
||||
if (IsDesignMode)
|
||||
return null;
|
||||
@@ -104,7 +104,7 @@ namespace FSI.BT.Tools.Commands
|
||||
/// <returns>The first parent item that matches the submitted
|
||||
/// type parameter. If not matching item can be found, a null
|
||||
/// reference is being returned.</returns>
|
||||
public static TParent? TryFindParent<TParent>(DependencyObject child) where TParent : DependencyObject
|
||||
public static TParent TryFindParent<TParent>(DependencyObject child) where TParent : DependencyObject
|
||||
{
|
||||
//get parent item
|
||||
DependencyObject parentObject = GetParentObject(child);
|
||||
@@ -131,7 +131,7 @@ namespace FSI.BT.Tools.Commands
|
||||
/// <param name="child">The item to be processed.</param>
|
||||
/// <returns>The submitted item's parent, if available. Otherwise
|
||||
/// null.</returns>
|
||||
public static DependencyObject? GetParentObject(DependencyObject child)
|
||||
public static DependencyObject GetParentObject(DependencyObject child)
|
||||
{
|
||||
if (child == null) return null;
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace FSI.BT.Tools.Commands
|
||||
DependencyObject parent = ContentOperations.GetParent(contentElement);
|
||||
if (parent != null) return parent;
|
||||
|
||||
FrameworkContentElement? fce = contentElement as FrameworkContentElement;
|
||||
FrameworkContentElement fce = contentElement as FrameworkContentElement;
|
||||
return fce?.Parent;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user