-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ListTour Layout to W10 DJNano Show
- Loading branch information
Showing
5 changed files
with
138 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
W10/DJNanoShow.W10/Layouts/List/Breakpoints.Large.ListTour.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"_import": "/Layouts/List/Breakpoints.Large.json", | ||
"breakpoints": [ | ||
{ | ||
"maxwidth": "321", | ||
"properties": { | ||
"itemsDesiredWidth": "140", | ||
"itemsHeight": "60", | ||
"titleMaxLines": "3" | ||
} | ||
}, | ||
{ | ||
"itemsDesiredWidth": "170", | ||
"maxwidth": "500", | ||
"properties": { | ||
"itemsHeight": "65", | ||
"titleMaxLines": "4" | ||
} | ||
}, | ||
{ | ||
"maxwidth": "900", | ||
"properties": { | ||
"itemsDesiredWidth": "220", | ||
"itemsHeight": "80", | ||
"titleMaxLines": "5" | ||
} | ||
}, | ||
{ | ||
"maxwidth": "1140", | ||
"properties": { | ||
"itemsDesiredWidth": "280", | ||
"itemsHeight": "80", | ||
"titleMaxLines": "5" | ||
} | ||
}, | ||
{ | ||
"maxwidth": "1650", | ||
"properties": { | ||
"itemsDesiredWidth": "360", | ||
"itemsHeight": "90", | ||
"titleMaxLines": "5" | ||
} | ||
}, | ||
{ | ||
"maxwidth": "*", | ||
"properties": { | ||
"itemsDesiredWidth": "450", | ||
"itemsHeight": "120", | ||
"titleMaxLines": "6" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<local:ListLayoutBase | ||
x:Class="DJNanoShow.Layouts.List.ListTour" | ||
x:Name="root" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:DJNanoShow.Layouts.List" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:was_controls="using:AppStudio.Controls" | ||
DataContext="{Binding RelativeSource={RelativeSource Self}}" | ||
mc:Ignorable="d" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400"> | ||
<UserControl.Resources> | ||
<was_controls:VisualBreakpoints x:Name="vbp" ConfigFile="/Layouts/List/Breakpoints.Large.ListTour.json"></was_controls:VisualBreakpoints> | ||
</UserControl.Resources> | ||
<Grid x:Name="main"> | ||
<was_controls:ResponsiveGridView | ||
x:Name="responsiveGridView" | ||
ItemsSource="{Binding ItemsSource, ElementName=root}" | ||
Margin="0,7,2,0" | ||
ItemClickCommand="{Binding ItemClickCommand, ElementName=root}" | ||
DesiredWidth="{Binding Active.itemsDesiredWidth, Source={StaticResource vbp}}" | ||
ItemHeight="{Binding Active.itemsHeight, Source={StaticResource vbp}}" | ||
OneRowModeEnabled="{Binding OneRowModeEnabled, ElementName=root}"> | ||
<was_controls:ResponsiveGridView.ItemTemplate> | ||
<DataTemplate> | ||
<Grid | ||
Height="{Binding Active.itemsHeight, Source={StaticResource vbp}}"> | ||
<RelativePanel | ||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" | ||
Margin="{Binding Active.itemMargin, Source={StaticResource vbp}}"> | ||
<TextBlock x:Name="title" | ||
Text="{Binding Title}" Style="{StaticResource TitleStyle}" | ||
FontSize="{Binding Active.titleFontSize, Source={StaticResource vbp}}" | ||
MaxLines="{Binding Active.titleMaxLines, Source={StaticResource vbp}}" | ||
RelativePanel.AlignTopWithPanel="True"/> | ||
<TextBlock | ||
Text="{Binding SubTitle}" | ||
Style="{StaticResource SubtitleStyle}" | ||
Margin="0,6,0,0" | ||
RelativePanel.Below="title" | ||
FontSize="{Binding Active.subTitleFontSize, Source={StaticResource vbp}}"/> | ||
</RelativePanel> | ||
</Grid> | ||
</DataTemplate> | ||
</was_controls:ResponsiveGridView.ItemTemplate> | ||
</was_controls:ResponsiveGridView> | ||
</Grid> | ||
</local:ListLayoutBase> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using AppStudio.Controls; | ||
|
||
namespace DJNanoShow.Layouts.List | ||
{ | ||
public sealed partial class ListTour : ListLayoutBase | ||
{ | ||
public ListTour() : base() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
//protected override double VBPItemHeight0 { get { return 130; } } | ||
//protected override double VBPItemHeight1 { get { return 180; } } | ||
//protected override double VBPItemHeight2 { get { return 180; } } | ||
//protected override double VBPItemHeight3 { get { return 220; } } | ||
//protected override double VBPItemHeight4 { get { return 280; } } | ||
//protected override double VBPItemHeight5 { get { return 320; } } | ||
|
||
//protected override ResponsiveGridView GridView() | ||
//{ | ||
// return responsiveGridView; | ||
//} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters