-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Russell Camo <[email protected]>
- Loading branch information
Showing
15 changed files
with
568 additions
and
120 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
<russkyc:ModernWindow | ||
x:Class="GroomWise.Views.Dialogs.EditCustomersView" | ||
xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:b="https://schemas.microsoft.com/xaml/behaviors" | ||
xmlns:d="https://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:GroomWise.Views.Dialogs" | ||
xmlns:mc="https://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:russkyc="clr-namespace:org.russkyc.moderncontrols;assembly=Russkyc.ModernControls.WPF" | ||
xmlns:templates="clr-namespace:GroomWise.Views.Templates" | ||
xmlns:viewModels="clr-namespace:GroomWise.Application.ViewModels;assembly=GroomWise.Application" | ||
xmlns:wpf="clr-namespace:Material.Icons.WPF;assembly=Material.Icons.WPF" | ||
Title="AddCustomersView" | ||
Width="600" | ||
d:DataContext="{d:DesignInstance viewModels:CustomerViewModel, | ||
IsDesignTimeCreatable=True}" | ||
FocusManager.FocusedElement="{Binding ElementName=FullNameTextBox}" | ||
NoDecorations="True" | ||
ResizeMode="NoResize" | ||
SizeToContent="Height" | ||
TitleBarHeight="0" | ||
WindowStartupLocation="CenterOwner" | ||
mc:Ignorable="d"> | ||
<Grid Style="{StaticResource FadeInAnimation}"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="*" /> | ||
</Grid.RowDefinitions> | ||
<TextBlock | ||
Grid.Row="0" | ||
Grid.Column="0" | ||
Margin="20,16,0,12" | ||
HorizontalAlignment="Left" | ||
FontSize="16" | ||
Text="Edit Customer" /> | ||
<StackPanel | ||
Grid.Row="1" | ||
Margin="20,0,16,20" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Top"> | ||
<Grid> | ||
<russkyc:ModernTextBox | ||
Name="FullNameTextBox" | ||
Margin="0,0,0,0" | ||
CornerRadius="5" | ||
HelperText="Max Length (200)" | ||
Placeholder="Full Name" | ||
Text="{Binding SelectedCustomer.FullName, UpdateSourceTrigger=PropertyChanged}" /> | ||
</Grid> | ||
<Grid Margin="0,12,0,0"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="350" /> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<russkyc:ModernTextBox | ||
Grid.Column="0" | ||
Margin="0,0,0,0" | ||
CornerRadius="5" | ||
HelperText="Max Length (200)" | ||
Placeholder="Email" | ||
Text="{Binding SelectedCustomer.Email, UpdateSourceTrigger=PropertyChanged}" /> | ||
<russkyc:ModernTextBox | ||
Grid.Column="1" | ||
Margin="12,0,0,0" | ||
CornerRadius="5" | ||
HelperText="Max Length (200)" | ||
Placeholder="Contact Number" | ||
Text="{Binding SelectedCustomer.ContactNumber, UpdateSourceTrigger=PropertyChanged}" /> | ||
|
||
</Grid> | ||
<russkyc:ModernTextBox | ||
Margin="0,12,0,0" | ||
CornerRadius="5" | ||
HelperText="Max Length (200)" | ||
Placeholder="Primary Address" | ||
Text="{Binding SelectedCustomer.Address, UpdateSourceTrigger=PropertyChanged}" /> | ||
<russkyc:ModernButton | ||
Margin="0,12,0,0" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Top" | ||
Command="{Binding AddSelectedCustomerPetCommand}" | ||
Content="Add Pet" | ||
CornerRadius="5" | ||
DefaultBackground="{DynamicResource bg-000}" | ||
FontWeight="Medium" | ||
Foreground="{DynamicResource fg-200}" | ||
HoverBackground="{DynamicResource bg-000}" | ||
LeftCenterIcon="{wpf:MaterialIconExt Kind=Add}" | ||
PressedBackground="{DynamicResource bg-100}" /> | ||
<ItemsControl | ||
MaxHeight="170" | ||
Margin="0,10,0,0" | ||
HorizontalAlignment="Stretch" | ||
ItemsSource="{Binding SelectedCustomer.Pets.EditableCollectionView, UpdateSourceTrigger=PropertyChanged}"> | ||
<ItemsControl.ItemTemplate> | ||
<DataTemplate> | ||
<templates:EditCustomerPetInfoCardTemplate /> | ||
</DataTemplate> | ||
</ItemsControl.ItemTemplate> | ||
|
||
<ItemsControl.ItemsPanel> | ||
<ItemsPanelTemplate> | ||
<VirtualizingStackPanel IsVirtualizing="True" VirtualizationMode="Recycling" /> | ||
</ItemsPanelTemplate> | ||
</ItemsControl.ItemsPanel> | ||
|
||
<ItemsControl.ItemContainerStyle> | ||
<Style TargetType="{x:Type FrameworkElement}"> | ||
<Setter Property="Margin" Value="0,0,0,10" /> | ||
</Style> | ||
</ItemsControl.ItemContainerStyle> | ||
|
||
<ItemsControl.Template> | ||
<ControlTemplate TargetType="ItemsControl"> | ||
<Border | ||
Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}"> | ||
<ScrollViewer | ||
Padding="{TemplateBinding Padding}" | ||
CanContentScroll="True" | ||
Focusable="False" | ||
VerticalScrollBarVisibility="Auto"> | ||
<ItemsPresenter /> | ||
</ScrollViewer> | ||
</Border> | ||
</ControlTemplate> | ||
</ItemsControl.Template> | ||
</ItemsControl> | ||
<StackPanel | ||
Margin="0,24,0,0" | ||
HorizontalAlignment="Right" | ||
Orientation="Horizontal"> | ||
<russkyc:ModernButton | ||
Margin="0,0,12,0" | ||
HorizontalAlignment="Right" | ||
Content="Cancel" | ||
CornerRadius="5" | ||
DefaultBackground="{DynamicResource bg-000}" | ||
FontWeight="Medium" | ||
Foreground="{DynamicResource fg-600}" | ||
HoverBackground="{DynamicResource bg-000}" | ||
PressedBackground="{DynamicResource bg-100}"> | ||
<b:Interaction.Triggers> | ||
<b:EventTrigger EventName="Click"> | ||
<b:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=russkyc:ModernWindow}}" /> | ||
</b:EventTrigger> | ||
</b:Interaction.Triggers> | ||
</russkyc:ModernButton> | ||
<russkyc:ModernButton | ||
HorizontalAlignment="Right" | ||
Command="{Binding UpdateCustomerCommand}" | ||
Content="Save Changes" | ||
CornerRadius="5" | ||
FontWeight="Medium" | ||
LeftCenterIcon="{wpf:MaterialIconExt Kind=ContentSave}" /> | ||
</StackPanel> | ||
</StackPanel> | ||
</Grid> | ||
</russkyc:ModernWindow> |
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,15 @@ | ||
// Copyright (C) 2023 Russell Camo (Russkyc).- All Rights Reserved | ||
// | ||
// Unauthorized copying or redistribution of all files, in source and binary forms via any medium | ||
// without written, signed consent from the author is strictly prohibited. | ||
|
||
namespace GroomWise.Views.Dialogs; | ||
|
||
public partial class EditCustomersView | ||
{ | ||
public EditCustomersView(object vm) | ||
{ | ||
DataContext = vm; | ||
InitializeComponent(); | ||
} | ||
} |
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
Oops, something went wrong.