Disable selection animation for now

This commit is contained in:
TheXamlGuy
2024-06-24 20:07:27 +01:00
parent 590bc61d70
commit 7a56e0dd5e
5 changed files with 71 additions and 44 deletions
+13
View File
@@ -34,6 +34,17 @@ public class ContentTemplate :
}
}
async void HandleDataContextChanged(object? sender, EventArgs args)
{
if (control.DataContext is object content)
{
if (content is IActivated activated)
{
await activated.Activated();
}
}
}
async void HandleUnloaded(object? sender, RoutedEventArgs args)
{
control.Unloaded -= HandleUnloaded;
@@ -48,6 +59,8 @@ public class ContentTemplate :
control.Loaded += HandleLoaded;
control.Unloaded += HandleUnloaded;
control.DataContextChanged += HandleDataContextChanged; ;
return control;
}
}