Removing UWP project.

This commit is contained in:
Burak Kaan Köse
2024-07-20 03:07:21 +02:00
parent 5b68f237f0
commit e04c17d591
294 changed files with 26742 additions and 163 deletions

View File

@@ -0,0 +1,46 @@
#if NET8_0
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
#else
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
#endif
namespace Wino.Helpers
{
public static class WinoVisualTreeHelper
{
public static T GetChildObject<T>(DependencyObject obj, string name) where T : FrameworkElement
{
DependencyObject child = null;
T grandChild = null;
for (int i = 0; i <= VisualTreeHelper.GetChildrenCount(obj) - 1; i++)
{
child = VisualTreeHelper.GetChild(obj, i);
if (child is T && (((T)child).Name == name | string.IsNullOrEmpty(name)))
{
return (T)child;
}
else
{
grandChild = GetChildObject<T>(child, name);
}
if (grandChild != null)
{
return grandChild;
}
}
return null;
}
}
}