-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
87 lines (81 loc) · 4.43 KB
/
Copy pathMainWindow.xaml
File metadata and controls
87 lines (81 loc) · 4.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="utf-8"?>
<Window
x:Class="BluetoothPanel.MainWindow"
Title="Bluetooth Panel"
SizeChanged="Window_SizeChanged"
Activated="Window_Activated"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:BluetoothPanel"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:muxc="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="d">
<Grid x:Name="Layout">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="gridColumn0" Width="250"/>
<ColumnDefinition x:Name="gridColumn1" Width="2*"/>
</Grid.ColumnDefinitions>
<!-- Left List for Key Values -->
<ListView x:Name="LeftListView" Grid.Column="0" Background="black">
<ListView.ItemTemplate>
<DataTemplate x:DataType="local:KeyValueListItem">
<StackPanel Tapped="LeftListViewItemClicked" DataContext="{x:Bind Key}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="gridColumn0" Width="2*" />
<ColumnDefinition x:Name="gridColumn1" Width="1*" />
</Grid.ColumnDefinitions>
<TextBlock Text="{x:Bind Key}" Grid.Column="0" />
<TextBlock Text="{x:Bind Value}" Grid.Column="1" />
</Grid>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<!-- Right Grid for Key Values-->
<GridView
x:Name="RightGridView"
Background="MediumPurple"
Grid.Column="1"
IsItemClickEnabled="False"
CanDragItems="True"
AllowDrop="True"
CanReorderItems="True"
>
<GridView.ItemTemplate>
<DataTemplate x:Name="GridItemTemplate" x:DataType="local:KeyValueGridItem">
<StackPanel DataContext="{x:Bind Key}" PointerPressed="GridStackPanelClicked" Width="150" Height="150" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Top" BorderBrush="Black">
<Border Background="Purple" Padding="0,3,0,3">
<TextBlock Text="{x:Bind Key}" FontSize="18" TextAlignment="Center" Grid.Row="1" />
</Border>
<Grid Height="200" Background="Black">
<Grid.RowDefinitions>
<RowDefinition x:Name="gridRow0" Height="auto"/>
<RowDefinition x:Name="gridRow1" Height="1*"/>
<RowDefinition x:Name="griwRow2" Height="auto"/>
</Grid.RowDefinitions>
<Rectangle Grid.Row="0" Height="16" />
<StackPanel Background="Gray" Grid.Row="1" VerticalAlignment="Center">
<TextBox Text="{x:Bind Value}" TextAlignment="Center" Padding="0,5,0,5" DataContext="{x:Bind Key}" TextChanged="GridItemChanged" GotFocus="GridItemFocused" LostFocus="GridItemUnfocused" />
</StackPanel>
<Rectangle Grid.Row="2" Height="100"/>
</Grid>
</StackPanel>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
<!-- Canvas for Buttons at Bottom Left -->
<Canvas x:Name="BottomRightCanvas">
<!-- Element positioned at the bottom left corner -->
<muxc:DropDownButton x:Name="BottomRightDropDown" Content="Devices">
<muxc:DropDownButton.Flyout>
<MenuFlyout x:Name="BottomRightDropDownFlyout" Placement="Top" />
</muxc:DropDownButton.Flyout>
</muxc:DropDownButton>
<Button x:Name="BottomRightButtonOne" Click="ConnectToDevice" Content="Connect"/>
<Button x:Name="BottomRightButtonTwo" Click="FindBluetoothConnections" Content="Find Devices"/>
<Button x:Name="BottomRightButtonThree" Click="ResetShouldSendData" Content="Reset Sending"/>
<!-- Add more buttons or elements as needed -->
</Canvas>
</Grid>
</Window>