mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Major changes in MainPage: now is layout dependant (with a base, to prepare for Settings)
Main sub pages also changed to better work with Main (but needs improvement) Added a Settings Page stub
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace ModernKeePass.Controls
|
||||
{
|
||||
public class FirstItemDataTemplateSelector: DataTemplateSelector
|
||||
{
|
||||
public DataTemplate FirstItem { get; set; }
|
||||
public DataTemplate OtherItem { get; set; }
|
||||
|
||||
protected override DataTemplate SelectTemplateCore(object item, DependencyObject container)
|
||||
{
|
||||
var itemsControl = ItemsControl.ItemsControlFromItemContainer(container);
|
||||
var returnTemplate = itemsControl.IndexFromContainer(container) == 0 ? FirstItem : OtherItem;
|
||||
return returnTemplate;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user