add demo of new tags box based on specialised wrap panel.
MODIFY
WalletWasabi.Fluent/Controls/TagsBox.xaml
WalletWasabi.Fluent/Controls/TagsBox.xaml
<Setter Property="FocusAdorner" Value="{x:Null}" />
<Setter Property="Template">
<ControlTemplate>
- <Panel>
- <Border
- Name="PART_BorderElement"
- Background="{TemplateBinding Background}"
+ <Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
- MinWidth="{TemplateBinding MinWidth}"
- MinHeight="{TemplateBinding MinHeight}"
- Focusable="False" />
- <Panel Name="PART_FocusPanel" Background="Transparent">
- <i:Interaction.Behaviors>
- <ia:EventTriggerBehavior EventName="PointerReleased"
- SourceObject="{Binding #PART_FocusPanel}">
- <ia:InvokeCommandAction Command="{Binding GrabFocusCommand}" />
- </ia:EventTriggerBehavior>
- </i:Interaction.Behaviors>
- </Panel>
- <Panel Margin="{TemplateBinding BorderThickness}">
- <Grid ColumnDefinitions="Auto,*,Auto">
- <DockPanel Background="{x:Null}" x:Name="PART_InnerDockPanel" Grid.Column="1"
- Margin="{TemplateBinding Padding}">
- <DataValidationErrors>
- <ScrollViewer Background="{x:Null}"
- HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
- VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
- <Panel>
- <ItemsControl x:DataType="vmt:TagsBoxViewModel"
- Items="{CompiledBinding CombinedContent}">
- <ItemsControl.ItemsPanel>
+ Padding="{TemplateBinding Padding}">
+ <ItemsPresenter Name="PART_ItemsPresenter"
+ Items="{TemplateBinding Items}"
+ ItemTemplate="{TemplateBinding ItemTemplate}">
+ <ItemsPresenter.ItemsPanel>
<ItemsPanelTemplate>
- <WrapPanel />
+ <c:ConcatenatingWrapPanel>
+ <c:ConcatenatingWrapPanel.ConcatenatedChildren>
+ <TextBox Text="test" />
+ </c:ConcatenatingWrapPanel.ConcatenatedChildren>
+ </c:ConcatenatingWrapPanel>
</ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- </ItemsControl>
- </Panel>
- </ScrollViewer>
- </DataValidationErrors>
- </DockPanel>
- </Grid>
- </Panel>
- </Panel>
+ </ItemsPresenter.ItemsPanel>
+ </ItemsPresenter>
+ </Border>
</ControlTemplate>
</Setter>
</Style>
-
- <Style Selector="c|TagsBox:pointerover /template/ Border#PART_BorderElement">
- <Setter Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushPointerOver}" />
- <Setter Property="Background" Value="{DynamicResource TextControlBackgroundPointerOver}" />
- </Style>
-
- <Style Selector="c|TagsBox AutoCompleteBox">
- <Setter Property="Background" Value="{x:Null}" />
- <Setter Property="Padding" Value="3,10,0, 10" />
- <Setter Property="Margin" Value="0" />
- </Style>
-
- <Style Selector="c|TagsBox AutoCompleteBox /template/ TextBox /template/ Border#PART_BorderElement">
- <Setter Property="IsVisible" Value="False" />
- </Style>
-
- <Style Selector="c|TagsBox AutoCompleteBox /template/ TextBox">
- <Setter Property="IsReadOnly" Value="{Binding !IsInputEnabled}" />
- </Style>
-
</Styles>
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Controls/TagsBox.xaml.cs
WalletWasabi.Fluent/Controls/TagsBox.xaml.cs
@@ -4,7 +4,8 @@ namespace WalletWasabi.Fluent.Controls
{
/// <summary>
/// </summary>
- public class TagsBox : ContentControl
+ public class TagsBox : ItemsControl
{
+
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/TagsBox/TagsBoxViewModel.cs
WalletWasabi.Fluent/ViewModels/TagsBox/TagsBoxViewModel.cs
@@ -49,6 +49,12 @@ namespace WalletWasabi.Fluent.ViewModels.TagsBox
TagInput?.GrabFocusAction?.Invoke();
return new object();
});
+
+ AddTag("Test1");
+ AddTag("Test2");
+ AddTag("Test3");
+ AddTag("Test4");
+ AddTag("Test5");
}
public ReadOnlyObservableCollection<object> CombinedContent => _combinedContent;

MODIFY
WalletWasabi.Fluent/Views/RecoveryPageView.axaml
WalletWasabi.Fluent/Views/RecoveryPageView.axaml
<Label Classes="h7 bold" Content="_Type in your recovery words here:" Target="seedTagsBox"/>
<c:TagsBox x:Name="seedTagsBox" Grid.Row="2"
DataContext="{Binding RecoveryWordsTagsBox}"
+ Items="{Binding Tags}"
MinHeight="60"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" />
</Grid>

add demo of new tags box based on specialised wrap panel.