|
| 1 | +<!-- Copyright (c) 2024 Files Community. Licensed under the MIT License. See the LICENSE. --> |
| 2 | +<ContentDialog |
| 3 | + x:Class="Files.App.Dialogs.BulkRenameDialog" |
| 4 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 5 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 6 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 7 | + xmlns:helpers="using:Files.App.Helpers" |
| 8 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 9 | + Title="{helpers:ResourceString Name=BulkRename}" |
| 10 | + DefaultButton="Primary" |
| 11 | + HighContrastAdjustment="None" |
| 12 | + IsPrimaryButtonEnabled="{x:Bind ViewModel.IsNameValid, Mode=OneWay}" |
| 13 | + PrimaryButtonCommand="{x:Bind ViewModel.CommitRenameCommand, Mode=OneWay}" |
| 14 | + PrimaryButtonText="{helpers:ResourceString Name=Rename}" |
| 15 | + RequestedTheme="{x:Bind RootAppElement.RequestedTheme, Mode=OneWay}" |
| 16 | + SecondaryButtonText="{helpers:ResourceString Name=Cancel}" |
| 17 | + Style="{StaticResource DefaultContentDialogStyle}" |
| 18 | + mc:Ignorable="d"> |
| 19 | + |
| 20 | + <StackPanel Width="440" Spacing="4"> |
| 21 | + |
| 22 | + <!-- Name --> |
| 23 | + <Grid |
| 24 | + Padding="12" |
| 25 | + Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" |
| 26 | + BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
| 27 | + BorderThickness="1" |
| 28 | + ColumnSpacing="8" |
| 29 | + CornerRadius="4"> |
| 30 | + <Grid.ColumnDefinitions> |
| 31 | + <ColumnDefinition Width="*" /> |
| 32 | + <ColumnDefinition Width="Auto" /> |
| 33 | + </Grid.ColumnDefinitions> |
| 34 | + |
| 35 | + <TextBlock |
| 36 | + Grid.Column="0" |
| 37 | + VerticalAlignment="Center" |
| 38 | + Text="{helpers:ResourceString Name=Name}" /> |
| 39 | + |
| 40 | + <TextBox |
| 41 | + x:Name="FileNameBox" |
| 42 | + Grid.Column="1" |
| 43 | + Width="260" |
| 44 | + PlaceholderText="{helpers:ResourceString Name=EnterName}" |
| 45 | + Text="{x:Bind ViewModel.FileName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> |
| 46 | + <TextBox.Resources> |
| 47 | + <TeachingTip |
| 48 | + x:Name="InvalidNameWarning" |
| 49 | + Title="{helpers:ResourceString Name=InvalidFilename/Text}" |
| 50 | + IsOpen="{x:Bind ViewModel.ShowNameWarning, Mode=OneWay}" |
| 51 | + PreferredPlacement="Bottom" |
| 52 | + Target="{x:Bind FileNameBox}" /> |
| 53 | + </TextBox.Resources> |
| 54 | + </TextBox> |
| 55 | + |
| 56 | + </Grid> |
| 57 | + |
| 58 | + </StackPanel> |
| 59 | +</ContentDialog> |
0 commit comments