Files
Shrlalgo.RvKits/ShrlAlgoToolkit.RevitAddins/Common/Controls/NavigateViewWin.xaml
2026-02-22 20:03:42 +08:00

29 lines
1.4 KiB
XML

<ui:MelWindow
Height="200"
Icon="{DynamicResource RevitIcon}"
Title="选择视图"
Width="300"
d:DataContext="{d:DesignInstance Type=windows:NavigateViewViewModel}"
mc:Ignorable="d"
x:Class="ShrlAlgoToolkit.RevitAddins.Common.Controls.NavigateViewWin"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.Common.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="https://github.com/ShrlAlgo/Melskin"
xmlns:windows="clr-namespace:ShrlAlgoToolkit.RevitAddins.Common.Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Window.Resources>
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
</Window.Resources>
<Grid>
<ListBox DisplayMemberPath="Name" ItemsSource="{Binding Views}">
<b:Interaction.Triggers>
<b:EventTrigger EventName="MouseDoubleClick">
<b:InvokeCommandAction Command="{Binding NavigateViewCommand}" CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBox}}" />
</b:EventTrigger>
</b:Interaction.Triggers>
</ListBox>
</Grid>
</ui:MelWindow>