make texts selectable
MODIFY
WalletWasabi.Fluent/Styles/TextBox.axaml
WalletWasabi.Fluent/Styles/TextBox.axaml
<Setter Property="MinHeight" Value="0" />
<Setter Property="MinWidth" Value="0" />
<Setter Property="CaretBrush" Value="Transparent" />
+ <Setter Property="TextBlock.TextWrapping" Value="Wrap" />
<Setter Property="ContextMenu">
<ContextMenu>
<MenuItem Header="Copy" Command="{Binding $parent[TextBox].Copy}" IsEnabled="{Binding $parent[TextBox].CanCopy}" InputGesture="{x:Static TextBox.CopyGesture}"/>

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
@@ -28,7 +28,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
[AutoNotify] private DateTimeOffset _date;
[AutoNotify] private string? _amount;
[AutoNotify] private SmartLabel? _labels;
- [AutoNotify] private uint256? _transactionId;
+ [AutoNotify] private string? _transactionId;
public TransactionDetailsViewModel(TransactionSummary transactionSummary, Wallet wallet, IObservable<Unit> updateTrigger)
{
@@ -52,13 +52,13 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
return;
}
- await Application.Current.Clipboard.SetTextAsync(TransactionId.ToString());
+ await Application.Current.Clipboard.SetTextAsync(TransactionId);
}
private void UpdateValues(TransactionSummary transactionSummary)
{
Date = transactionSummary.DateTime.ToLocalTime();
- TransactionId = transactionSummary.TransactionId;
+ TransactionId = transactionSummary.TransactionId.ToString();
Labels = transactionSummary.Label;
BlockHeight = transactionSummary.Height.Type == HeightType.Chain ? transactionSummary.Height.Value : 0;
Confirmations = transactionSummary.Height.Type == HeightType.Chain ? (int)_wallet.BitcoinStore.SmartHeaderChain.TipHeight - transactionSummary.Height.Value + 1 : 0;
@@ -85,7 +85,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
var historyBuilder = new TransactionHistoryBuilder(_wallet);
var txRecordList = await Task.Run(historyBuilder.BuildHistorySummary);
- var currentTransaction = txRecordList.FirstOrDefault(x => x.TransactionId == TransactionId);
+ var currentTransaction = txRecordList.FirstOrDefault(x => x.TransactionId.ToString() == TransactionId);
if (currentTransaction is { })
{

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/TransactionDetailsView.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/TransactionDetailsView.axaml
<!-- Date -->
<c:PreviewItem Icon="{StaticResource timer_regular}"
Text="Date / Time"
- Content="{Binding Date, StringFormat='{}{0:MM/dd/yyyy HH:mm}'}"
- CopyParameter="{Binding Date, StringFormat='{}{0:MM/dd/yyyy HH:mm}'}" />
-
+ CopyParameter="{Binding Date, StringFormat='{}{0:MM/dd/yyyy HH:mm}'}">
+ <TextBox Classes="selectableTextBlock" Text="{Binding Date, StringFormat='{}{0:MM/dd/yyyy HH:mm}'}" />
+ </c:PreviewItem>
<Separator />
<!-- Transaction ID -->
<c:PreviewItem Icon="{StaticResource transaction_id}"
Text="Transaction ID"
CopyParameter="{Binding TransactionId}">
- <c:PrivacyContentControl Content="{Binding TransactionId}" NumberOfPrivacyChars="48" />
+ <c:PrivacyContentControl NumberOfPrivacyChars="48">
+ <TextBox Classes="selectableTextBlock" Text="{Binding TransactionId}" />
+ </c:PrivacyContentControl>
</c:PreviewItem>
<Separator />
<c:PreviewItem Icon="{StaticResource status_regular}"
Text="Status">
<Panel>
- <TextBlock Text="Confirmed" IsVisible="{Binding IsConfirmed}" />
- <TextBlock Text="Pending" IsVisible="{Binding !IsConfirmed}" />
+ <TextBox Classes="selectableTextBlock" Text="Confirmed" IsVisible="{Binding IsConfirmed}" />
+ <TextBox Classes="selectableTextBlock" Text="Pending" IsVisible="{Binding !IsConfirmed}" />
</Panel>
</c:PreviewItem>
<!-- Incoming amount -->
<c:PreviewItem Icon="{StaticResource btc_logo}"
Text="Amount"
- Content="{Binding Amount, StringFormat={}{0} BTC}"
- CopyParameter="{Binding Amount}" />
+ CopyParameter="{Binding Amount}">
+ <TextBox Classes="selectableTextBlock" Text="{Binding Amount, StringFormat={}{0} BTC}" />
+ </c:PreviewItem>
<Separator />
<!-- Block height -->
<c:PreviewItem Icon="{StaticResource block_height}"
Text="Block height"
- Content="{Binding BlockHeight}"
CopyParameter="{Binding BlockHeight}"
- IsVisible="{Binding IsConfirmed}" />
+ IsVisible="{Binding IsConfirmed}">
+ <TextBox Classes="selectableTextBlock" Text="{Binding BlockHeight}" />
+ </c:PreviewItem>
<Separator IsVisible="{Binding IsConfirmed}" />
<!-- Confirmations -->
<c:PreviewItem Icon="{StaticResource copy_confirmed}"
Text="Confirmations"
- Content="{Binding Confirmations}"
- CopyParameter="{Binding Confirmations}" />
+ CopyParameter="{Binding Confirmations}">
+ <TextBox Classes="selectableTextBlock" Text="{Binding Confirmations}" />
+ </c:PreviewItem>
<Separator />

MODIFY
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveAddressView.axaml
WalletWasabi.Fluent/Views/Wallets/Receive/ReceiveAddressView.axaml
ClickIcon="{StaticResource copy_confirmed}"
ExecuteOnOpen="{Binding IsAutoCopyEnabled}" />
</StackPanel>
- <c:PrivacyContentControl Content="{Binding Address}" FontSize="{StaticResource FontSizeH5}" NumberOfPrivacyChars="38" />
+ <c:PrivacyContentControl FontSize="{StaticResource FontSizeH5}" NumberOfPrivacyChars="38">
+ <TextBox Classes="selectableTextBlock" Text="{Binding Address}" />
+ </c:PrivacyContentControl>
</DockPanel>
<c:PrivacyContentControl PrivacyReplacementMode="Text" NumberOfPrivacyChars="15" HorizontalAlignment="Center">
<c:TagsBox IsReadOnly="True" Items="{Binding Labels}" />

make texts selectable