Skip to content

Commit

Permalink
UI Grid Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbyRobbyRobby committed Sep 19, 2019
1 parent a7277d3 commit f8f3977
Show file tree
Hide file tree
Showing 10 changed files with 231 additions and 2 deletions.
21 changes: 21 additions & 0 deletions UWP Visual Asset Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,21 @@
<Compile Include="MVVM\BindableBase.cs" />
<Compile Include="MVVM\ValleyBaseViewModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UserControls\AssetBrowserUserControl.xaml.cs">
<DependentUpon>AssetBrowserUserControl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControls\AssetEditUserControl.xaml.cs">
<DependentUpon>AssetEditUserControl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControls\FeedbackUserControl.xaml.cs">
<DependentUpon>FeedbackUserControl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControls\GettingStartedUserControl.xaml.cs">
<DependentUpon>GettingStartedUserControl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControls\SidebarUserControl.xaml.cs">
<DependentUpon>SidebarUserControl.xaml</DependentUpon>
</Compile>
<Compile Include="UserControls\WelcomeUserControl.xaml.cs">
<DependentUpon>WelcomeUserControl.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -220,6 +229,14 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<Page Include="UserControls\AssetBrowserUserControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControls\AssetEditUserControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControls\FeedbackUserControl.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand All @@ -228,6 +245,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UserControls\SidebarUserControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControls\WelcomeUserControl.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
51 changes: 51 additions & 0 deletions UWP Visual Asset Generator.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29306.81
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UWP Visual Asset Generator", "UWP Visual Asset Generator.csproj", "{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|ARM.ActiveCfg = Debug|ARM
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|ARM.Build.0 = Debug|ARM
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|ARM.Deploy.0 = Debug|ARM
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|ARM64.ActiveCfg = Debug|ARM64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|ARM64.Build.0 = Debug|ARM64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|ARM64.Deploy.0 = Debug|ARM64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|x64.ActiveCfg = Debug|x64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|x64.Build.0 = Debug|x64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|x64.Deploy.0 = Debug|x64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|x86.ActiveCfg = Debug|x86
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|x86.Build.0 = Debug|x86
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Debug|x86.Deploy.0 = Debug|x86
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|ARM.ActiveCfg = Release|ARM
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|ARM.Build.0 = Release|ARM
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|ARM.Deploy.0 = Release|ARM
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|ARM64.ActiveCfg = Release|ARM64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|ARM64.Build.0 = Release|ARM64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|ARM64.Deploy.0 = Release|ARM64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|x64.ActiveCfg = Release|x64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|x64.Build.0 = Release|x64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|x64.Deploy.0 = Release|x64
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|x86.ActiveCfg = Release|x86
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|x86.Build.0 = Release|x86
{AAB23CB8-282B-4198-B7D0-1EF89B6D79FF}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2A15879D-3C3B-41C3-8022-918E6BF92164}
EndGlobalSection
EndGlobal
15 changes: 15 additions & 0 deletions UserControls/AssetBrowserUserControl.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<UserControl
x:Class="UWP_Visual_Asset_Generator.UserControls.AssetBrowserUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UWP_Visual_Asset_Generator.UserControls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">

<Grid>

</Grid>
</UserControl>
27 changes: 27 additions & 0 deletions UserControls/AssetBrowserUserControl.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236

namespace UWP_Visual_Asset_Generator.UserControls
{
public sealed partial class AssetBrowserUserControl : UserControl
{
public AssetBrowserUserControl()
{
this.InitializeComponent();
}
}
}
15 changes: 15 additions & 0 deletions UserControls/AssetEditUserControl.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<UserControl
x:Class="UWP_Visual_Asset_Generator.UserControls.AssetEditUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UWP_Visual_Asset_Generator.UserControls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">

<Grid>

</Grid>
</UserControl>
27 changes: 27 additions & 0 deletions UserControls/AssetEditUserControl.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236

namespace UWP_Visual_Asset_Generator.UserControls
{
public sealed partial class AssetEditUserControl : UserControl
{
public AssetEditUserControl()
{
this.InitializeComponent();
}
}
}
15 changes: 15 additions & 0 deletions UserControls/SidebarUserControl.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<UserControl
x:Class="UWP_Visual_Asset_Generator.UserControls.SidebarUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UWP_Visual_Asset_Generator.UserControls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">

<Grid>

</Grid>
</UserControl>
27 changes: 27 additions & 0 deletions UserControls/SidebarUserControl.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236

namespace UWP_Visual_Asset_Generator.UserControls
{
public sealed partial class SidebarUserControl : UserControl
{
public SidebarUserControl()
{
this.InitializeComponent();
}
}
}
13 changes: 13 additions & 0 deletions ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class MainViewModel : ValleyBaseViewModel

private bool _showFeedbackControl = false;
private bool _showGettingStartedControl = false;
private bool _showEditCurrentImage = false;

private const string WinStoreProductID = "9MZ6QRQTDKF2";

Expand Down Expand Up @@ -56,6 +57,18 @@ public bool ShowGettingStartedControl
NotifyPropertyChanged("ShowGettingStartedControl");
}
}
public bool ShowEditCurrentImage
{
get
{
return _showEditCurrentImage;
}
set
{
_showEditCurrentImage = value;
NotifyPropertyChanged("ShowEditCurrentImage");
}
}

public SettingsViewModel Settings
{
Expand Down
22 changes: 20 additions & 2 deletions Views/MainView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,25 @@
<Frame x:Name="ContentFrame" Background="{ThemeResource SystemControlAcrylicWindowBrush}">

<Grid>

<Grid.RowDefinitions>
<RowDefinition Height="32"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>

<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<uc:SidebarUserControl Grid.Row="1"
Grid.Column="0"/>

<uc:AssetBrowserUserControl Grid.Row="1"
Grid.Column="1"/>

<uc:AssetBrowserUserControl Grid.Row="1"
Grid.Column="1"
Visibility="{x:Bind mainViewModel.ShowEditCurrentImage, Mode=OneWay}"/>
</Grid>

</Frame>
Expand All @@ -92,7 +110,7 @@
<ItemsControl>
<NavigationViewItem Content="{x:Bind mainViewModel.Settings.AppVersion, Mode=OneWay}"
Icon="World"
Visibility="Collapsed"/>
Visibility="Visible"/>
<NavigationViewItem Content="Welcome"
Icon="Home"
x:Name="hmi_ShowWelcomeUSerControl"
Expand Down

0 comments on commit f8f3977

Please sign in to comment.