-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
127 additions
and
1 deletion.
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
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,59 @@ | ||
<ContentDialog | ||
x:Class="ChatApp.Dialog.UserListDialog" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:ChatApp.Dialog" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:system="using:Windows.System" | ||
mc:Ignorable="d" | ||
Title="User list" | ||
PrimaryButtonText="Create" | ||
SecondaryButtonText="Cancel" | ||
PrimaryButtonClick="ContentDialog_PrimaryButtonClick" | ||
SecondaryButtonClick="ContentDialog_SecondaryButtonClick"> | ||
|
||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="5*"/> | ||
</Grid.ColumnDefinitions> | ||
<ListView Name ="UserList" Grid.Column="0" | ||
Grid.Row="0" SelectionMode="Single"> | ||
<ListView.ItemContainerStyle> | ||
<Style TargetType="ListViewItem"> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="ListViewItem"> | ||
<ListViewItemPresenter | ||
ContentTransitions="{TemplateBinding ContentTransitions}" | ||
SelectionCheckMarkVisualEnabled="True" | ||
CheckBrush="{ThemeResource SystemControlForegroundBaseMediumHighBrush}" | ||
CheckBoxBrush="{ThemeResource SystemControlForegroundBaseMediumHighBrush}" | ||
DragBackground="{ThemeResource ListViewItemDragBackgroundThemeBrush}" | ||
DragForeground="{ThemeResource ListViewItemDragForegroundThemeBrush}" | ||
FocusBorderBrush="{ThemeResource SystemControlForegroundAltHighBrush}" | ||
FocusSecondaryBorderBrush="{ThemeResource SystemControlForegroundBaseHighBrush}" | ||
PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}" | ||
PointerOverBackground="{ThemeResource SystemControlHighlightListLowBrush}" | ||
PointerOverForeground="{ThemeResource SystemControlHighlightAltBaseHighBrush}" | ||
SelectedBackground="{ThemeResource SystemControlHighlightListAccentLowBrush}" | ||
SelectedForeground="{ThemeResource SystemControlHighlightAltBaseHighBrush}" | ||
SelectedPointerOverBackground="{ThemeResource SystemControlHighlightListAccentMediumBrush}" | ||
PressedBackground="{ThemeResource SystemControlHighlightListMediumBrush}" | ||
SelectedPressedBackground="{ThemeResource SystemControlHighlightListAccentHighBrush}" | ||
DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}" | ||
DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}" | ||
ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}" | ||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" | ||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" | ||
ContentMargin="{TemplateBinding Padding}" | ||
CheckMode="Inline"/> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</ListView.ItemContainerStyle> | ||
</ListView> | ||
</Grid> | ||
</ContentDialog> | ||
|
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,44 @@ | ||
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; | ||
using ChatApp.Model; | ||
|
||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | ||
|
||
namespace ChatApp.Dialog | ||
{ | ||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
public sealed partial class UserListDialog : ContentDialog | ||
{ | ||
private List<User> Users; | ||
|
||
public UserListDialog(List<User> target) | ||
{ | ||
InitializeComponent(); | ||
UserList.ItemsSource = target; | ||
} | ||
|
||
private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
private void ContentDialog_SecondaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) | ||
{ | ||
Hide(); | ||
} | ||
} | ||
} |
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
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
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