mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-14 03:43:56 +00:00
* RootPageDetail.xaml:
* RootPageMaster.xaml: * RootPageDetail.xaml.cs: * RootPageMaster.xaml.cs: * RootPageMenuItem.cs: Remove Unused Items * RootPage.xaml: * RootPage.xaml.cs: Convert to Flyout and MasterDetail deprecated * packages.config: * packages.config: * qController.iOS.csproj: * qController.Droid.csproj: * Resource.designer.cs: * qController.csproj: Update Dependencies * QNavBar.cs: Conver QNavBar to Frame Based * App.xaml.cs: Reorganize intialization and convert to Flyout * QBrowserPage.xaml: Convert to StackLayout
This commit is contained in:
@@ -12,35 +12,28 @@
|
||||
BackgroundColor="{DynamicResource PageBackgroundColor}">
|
||||
<ContentPage.Content>
|
||||
|
||||
<Grid RowSpacing="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="10"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackLayout>
|
||||
<qui:QNavBar/>
|
||||
|
||||
<!--Ordering is based on the order last is on top seems pretty backwards to me-->
|
||||
<!--Old "Instance" listview -->
|
||||
<ListView x:Name="storageListView"
|
||||
HasUnevenRows="true"
|
||||
BackgroundColor="{DynamicResource PageBackgroundColor}"
|
||||
SeparatorVisibility="None"
|
||||
Grid.Row="1">
|
||||
SeparatorVisibility="None">
|
||||
|
||||
</ListView>
|
||||
|
||||
<!--Simple Divider-->
|
||||
<BoxView HeightRequest="10"
|
||||
BackgroundColor="DarkGray"
|
||||
Grid.Row="2"/>
|
||||
BackgroundColor="DarkGray"/>
|
||||
|
||||
<!--Beginning of new style of "server" view-->
|
||||
<Frame BackgroundColor="{DynamicResource PageBackgroundColor}"
|
||||
CornerRadius="0"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
Grid.Row="3">
|
||||
HasShadow="False">
|
||||
<StackLayout Spacing="0" BackgroundColor="Transparent">
|
||||
<Label Margin="0,10,0,10"
|
||||
Padding="0"
|
||||
@@ -49,7 +42,7 @@
|
||||
HorizontalTextAlignment="Center"
|
||||
FontSize="Header"
|
||||
Text="Discovered QLab Instances" />
|
||||
<!--Need to try and remove the group spacing caused by ios:GroupHeaderStyle-->
|
||||
Need to try and remove the group spacing caused by ios:GroupHeaderStyle
|
||||
<ListView x:Name="serverListView"
|
||||
ios:ListView.GroupHeaderStyle="Grouped"
|
||||
GroupDisplayBinding="{Binding name}"
|
||||
@@ -150,8 +143,6 @@
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
<qui:QNavBar x:Name="qNavBar"
|
||||
Grid.Row="0"/>
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="qController.RootPage" xmlns:pages="clr-namespace:qController">
|
||||
|
||||
</MasterDetailPage>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="qController.Pages.RootPageDetail" Title="Detail">
|
||||
<StackLayout Padding="10">
|
||||
<Label Text="This is a detail page. To get the 'triple' line icon on each platform add a icon to each platform and update the 'Master' page with an Icon that references it." />
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace qController.Pages
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RootPageDetail : ContentPage
|
||||
{
|
||||
public RootPageDetail()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="qController.Pages.RootPageMaster" Title="Master">
|
||||
<StackLayout>
|
||||
<ListView x:Name="MenuItemsListView" SeparatorVisibility="None" HasUnevenRows="true" ItemsSource="{Binding MenuItems}">
|
||||
<ListView.Header>
|
||||
<Grid BackgroundColor="#03A9F4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="10" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30" />
|
||||
<RowDefinition Height="80" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="1" Grid.Row="2" Text="AppName" Style="{DynamicResource SubtitleStyle}" />
|
||||
</Grid>
|
||||
</ListView.Header>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<StackLayout Padding="15,10" HorizontalOptions="FillAndExpand">
|
||||
<Label VerticalOptions="FillAndExpand" VerticalTextAlignment="Center" Text="{Binding Title}" FontSize="24" />
|
||||
</StackLayout>
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
@@ -1,56 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace qController.Pages
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RootPageMaster : ContentPage
|
||||
{
|
||||
public ListView ListView;
|
||||
|
||||
public RootPageMaster()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
BindingContext = new RootPageMasterViewModel();
|
||||
ListView = MenuItemsListView;
|
||||
}
|
||||
|
||||
class RootPageMasterViewModel : INotifyPropertyChanged
|
||||
{
|
||||
public ObservableCollection<RootPageMenuItem> MenuItems { get; set; }
|
||||
|
||||
public RootPageMasterViewModel()
|
||||
{
|
||||
MenuItems = new ObservableCollection<RootPageMenuItem>(new[]
|
||||
{
|
||||
new RootPageMenuItem { Id = 0, Title = "Page 1" },
|
||||
new RootPageMenuItem { Id = 1, Title = "Page 2" },
|
||||
new RootPageMenuItem { Id = 2, Title = "Page 3" },
|
||||
new RootPageMenuItem { Id = 3, Title = "Page 4" },
|
||||
new RootPageMenuItem { Id = 4, Title = "Page 5" },
|
||||
});
|
||||
}
|
||||
|
||||
#region INotifyPropertyChanged Implementation
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
void OnPropertyChanged([CallerMemberName] string propertyName = "")
|
||||
{
|
||||
if (PropertyChanged == null)
|
||||
return;
|
||||
|
||||
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FlyoutPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="qController.RootPage"
|
||||
xmlns:pages="clr-namespace:qController">
|
||||
|
||||
</FlyoutPage>
|
||||
+3
-3
@@ -12,7 +12,7 @@ namespace qController
|
||||
}
|
||||
}
|
||||
|
||||
public partial class RootPage : MasterDetailPage
|
||||
public partial class RootPage : FlyoutPage
|
||||
{
|
||||
public MenuPage MenuPage;
|
||||
public delegate void MenuItemSelectedHandler(object source, MenuEventArgs args);
|
||||
@@ -21,12 +21,12 @@ namespace qController
|
||||
public RootPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Flyout = new MenuPage();
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
MenuPage = (MenuPage)Master;
|
||||
MenuPage = (MenuPage)Flyout;
|
||||
|
||||
MenuPage.setItemSelected(OnItemSelected);
|
||||
}
|
||||
Reference in New Issue
Block a user