enable IsDefault only if the page is activated
MODIFY
WalletWasabi.Fluent/Controls/ContentArea.axaml
WalletWasabi.Fluent/Controls/ContentArea.axaml
IsVisible="{TemplateBinding EnableNext}"
Content="{TemplateBinding NextContent}"
Command="{Binding NextCommand}"
- IsDefault="True">
+ IsDefault="{Binding IsActive}">
<i:Interaction.Behaviors>
<behaviors:FocusOnAttachedBehavior
IsEnabled="{Binding FocusNext, RelativeSource={RelativeSource TemplatedParent}}" />

MODIFY
WalletWasabi.Fluent/Controls/QuestionControl.axaml
WalletWasabi.Fluent/Controls/QuestionControl.axaml
<DockPanel HorizontalAlignment="Stretch" MaxWidth="500" DockPanel.Dock="Bottom">
<Button Name="PART_NoButton" HorizontalAlignment="Left" Content="No" Classes="yesNo"
Command="{TemplateBinding NoCommand}" />
- <Button Name="PART_YesButton" HorizontalAlignment="Right" Content="Yes" Classes="yesNo" IsDefault="True"
+ <Button Name="PART_YesButton" HorizontalAlignment="Right" Content="Yes" Classes="yesNo"
Command="{TemplateBinding YesCommand}" />
</DockPanel>
<ContentPresenter Content="{TemplateBinding Content}"
<Setter Property="Background" Value="{DynamicResource ActionButtonPressedBackgroundColor}" />
</Style>
+ <!-- IsDefault -->
+ <Style Selector="c|QuestionControl[HighlightButton=Both] /template/ Button#PART_NoButton,
+ c|QuestionControl[HighlightButton=Both] /template/ Button#PART_YesButton">
+ <Setter Property="IsDefault" Value="false" />
+ </Style>
+ <Style Selector="c|QuestionControl[HighlightButton=NoButton] /template/ Button#PART_NoButton">
+ <Setter Property="IsDefault" Value="{Binding IsActive}" />
+ </Style>
+ <Style Selector="c|QuestionControl[HighlightButton=YesButton] /template/ Button#PART_YesButton">
+ <Setter Property="IsDefault" Value="{Binding IsActive}" />
+ </Style>
</Styles>

MODIFY
WalletWasabi.Fluent/Views/AddWallet/SelectWalletCreationOptionView.axaml
WalletWasabi.Fluent/Views/AddWallet/SelectWalletCreationOptionView.axaml
Classes="action"
Icon="{StaticResource add_regular}"
Command="{Binding CreateWalletCommand}"
- IsDefault="True" />
+ IsDefault="{Binding IsActive}" />
<c:TileButton Text="Connect to hardware wallet"
Icon="{StaticResource calculator_regular}"
Command="{Binding ConnectHardwareWalletCommand}" />

MODIFY
WalletWasabi.Fluent/Views/Login/LoginView.axaml
WalletWasabi.Fluent/Views/Login/LoginView.axaml
</TextBox>
<Panel Margin="0 -20 0 0 ">
<Button Classes="activeHyperLink skip" Content="Forgot password?" HorizontalAlignment="Left" Command="{Binding ForgotPasswordCommand}"/>
- <Button Content="Login" IsDefault="{Binding ErrorMessage, Converter={x:Static StringConverters.IsNullOrEmpty}}" Focusable="False" Classes="action" HorizontalAlignment="Right" Command="{Binding NextCommand}">
-
+ <Button Content="Login" Focusable="False" Classes="action" HorizontalAlignment="Right" Command="{Binding NextCommand}">
+ <Button.IsDefault>
+ <MultiBinding Converter="{x:Static BoolConverters.And}">
+ <Binding Path="ErrorMessage" Converter="{x:Static StringConverters.IsNullOrEmpty}" />
+ <Binding Path="IsActive" />
+ </MultiBinding>
+ </Button.IsDefault>
</Button>
</Panel>
</DockPanel>
VerticalAlignment="Bottom"
Classes="fadeAnimation">
<TextBlock Text="{Binding ErrorMessage}" HorizontalAlignment="Center" />
- <Button Content="OK" IsDefault="{Binding ErrorMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" Focusable="False" Classes="action" HorizontalAlignment="Center" Command="{Binding OkCommand}" />
+ <Button Content="OK" Focusable="False" Classes="action" HorizontalAlignment="Center" Command="{Binding OkCommand}">
+ <Button.IsDefault>
+ <MultiBinding Converter="{x:Static BoolConverters.And}">
+ <Binding Path="ErrorMessage" Converter="{x:Static StringConverters.IsNotNullOrEmpty}" />
+ <Binding Path="IsActive" />
+ </MultiBinding>
+ </Button.IsDefault>
+ </Button>
</StackPanel>
</StackPanel>

enable IsDefault only if the page is activated