Files
huehuehue/HueUWP/MainPage.xaml
T
2015-11-30 11:40:17 +01:00

40 lines
1.7 KiB
XML

<Page
x:Class="HueUWP.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:HueUWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
DataContext="{Binding LightsViewModel, RelativeSource={RelativeSource Self}}"
mc:Ignorable="d">
<Grid>
<StackPanel Margin="20,40,20,40">
<ListView x:Name="myListView" ItemsSource="{Binding}" >
<ListView.ItemTemplate>
<DataTemplate x:Name="dataTemplate">
<StackPanel Orientation="Horizontal">
<Rectangle Width="20" Height="20" Fill="Red" Margin="20, 0,0,0" />
<StackPanel Orientation="Vertical" Width="110" Margin="0,0,0,20">
<TextBlock Text="{Binding Name}" FontSize="24" />
<TextBlock Text="{Binding Type}" FontSize="14" />
</StackPanel>
<ToggleSwitch Toggled="ToggleSwitch_Toggled">
<ToggleSwitch.OffContent>Off</ToggleSwitch.OffContent>
<ToggleSwitch.OnContent>On</ToggleSwitch.OnContent>
</ToggleSwitch>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
</Grid>
</Page>