![]()
详情
<!--详情--><h:OutlookSectionCattach.Icon="{x:Static FontIcons.OpenFile}"Header="详情"><DockPanel><ContentPresenterMargin="5"Content="{Binding Collection.SelectedItem.Model}"DockPanel.Dock="Top"/><h:FormForeground="{DynamicResource {x:Static h:BrushKeys.Foreground}}"SelectObject="{Binding Collection.SelectedItem.Model, Mode=TwoWay}"TitleWidth="50"UseNull="False"UsePropertyView="True"/></DockPanel></h:OutlookSection>
编辑
<!--编辑--><h:OutlookSectionCattach.Icon="{x:Static FontIcons.Edit}"Header="编辑"><h:FormForeground="{DynamicResource {x:Static h:BrushKeys.Foreground}}"SelectObject="{Binding Collection.SelectedItem.Model, Mode=TwoWay}"TitleWidth="50"/></h:OutlookSection>
标签列表
<!--标签列表--><h:OutlookSectionCattach.Icon="{x:Static FontIcons.Tag}"Header="标签列表"><ListBoxItemsSource="{Binding Collection.SelectedItem.Shapes}"SelectedItem="{Binding Collection.SelectedItem.SelectedShape}"><ItemsControl.ItemTemplate><DataTemplate><DockPanel><DockPanelLastChildFill="False"><BorderWidth="20"Height="10"Margin="5,0"Background="{Binding Stroke}"CornerRadius="1"/><TextBlockVerticalAlignment="Center"Text="{Binding Title}"/><FontIconButtonCommand="{DeleteCommand UseDialog=False}"CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self}}"Content="{x:Static FontIcons.Delete}"DockPanel.Dock="Right"/></DockPanel></DockPanel></DataTemplate></ItemsControl.ItemTemplate></ListBox></h:OutlookSection>
设置图像分类
<!--设置图像分类--><h:OutlookSectionCattach.Icon="{x:Static FontIcons.GroupList}"Header="设置图像分类"><h:Cattach.CaptionRightTemplate><ControlTemplate><DockPanel><FontIconButtonHeight="Auto"HorizontalAlignment="Right"Background="Transparent"Command="{CreateTagCommand}"Content="{x:Static FontIcons.Add}"ToolTip="新建分类"/><FontIconButtonHeight="Auto"HorizontalAlignment="Right"Background="Transparent"Command="{ManageTagCommand}"Content="{x:Static FontIcons.Setting}"ToolTip="管理分类"/></DockPanel></ControlTemplate></h:Cattach.CaptionRightTemplate><h:TagBoxTags="{Binding Collection.SelectedItem.Model.Tags, Mode=TwoWay}"/></h:OutlookSection>
设置收藏夹
<!--设置收藏夹--><h:OutlookSectionCattach.Icon="{x:Static FontIcons.FavoriteStarFill}"Header="设置收藏夹"Visibility="{Binding Source={x:Static h:IocProject.Instance}, Path=Current.Setting.UseFavoritePath, Converter={x:Static h:Converter.GetTrueToVisible}}"><h:FavoriteBoxCattach.TopTemplate="{x:Null}"SelectedFavoritePath="{Binding Collection.SelectedItem.Model.FavoritePath, Mode=TwoWay}"/></h:OutlookSection>
完整代码
<h:OutlookBarWidth="250"Margin="0,0,1,0"DockPanel.Dock="Right"DockPosition="Right"IsCloseButtonVisible="False"IsMaximized="True"MaxNumberOfButtons="5"NavigationPaneText="{Binding RelativeSource={RelativeSource Mode=Self}, Path=SelectedSection.Header}"ShowButtons="True"><h:OutlookBar.Sections><h:OutlookSectionCattach.Icon="{x:Static FontIcons.OpenFile}"Header="详情"><DockPanel><ContentPresenterMargin="5"Content="{Binding Collection.SelectedItem.Model}"DockPanel.Dock="Top"/><!--<ImageHeight="300"DockPanel.Dock="Top"Source="{Binding Collection.SelectedItem.Model, Converter={local:GetFileToViewConverter}, ConverterParameter=300, IsAsync=True}"/>--><h:FormForeground="{DynamicResource {x:Static h:BrushKeys.Foreground}}"SelectObject="{Binding Collection.SelectedItem.Model, Mode=TwoWay}"TitleWidth="50"UseNull="False"UsePropertyView="True"/></DockPanel></h:OutlookSection><h:OutlookSectionCattach.Icon="{x:Static FontIcons.Edit}"Header="编辑"><h:FormForeground="{DynamicResource {x:Static h:BrushKeys.Foreground}}"SelectObject="{Binding Collection.SelectedItem.Model, Mode=TwoWay}"TitleWidth="50"/></h:OutlookSection><h:OutlookSectionCattach.Icon="{x:Static FontIcons.Tag}"Header="标签列表"><ListBoxItemsSource="{Binding Collection.SelectedItem.Shapes}"SelectedItem="{Binding Collection.SelectedItem.SelectedShape}"><ItemsControl.ItemTemplate><DataTemplate><DockPanel><DockPanelLastChildFill="False"><BorderWidth="20"Height="10"Margin="5,0"Background="{Binding Stroke}"CornerRadius="1"/><TextBlockVerticalAlignment="Center"Text="{Binding Title}"/><FontIconButtonCommand="{DeleteCommand UseDialog=False}"CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self}}"Content="{x:Static FontIcons.Delete}"DockPanel.Dock="Right"/></DockPanel></DockPanel></DataTemplate></ItemsControl.ItemTemplate></ListBox></h:OutlookSection><h:OutlookSectionCattach.Icon="{x:Static FontIcons.GroupList}"Header="设置图像分类"><h:Cattach.CaptionRightTemplate><ControlTemplate><DockPanel><FontIconButtonHeight="Auto"HorizontalAlignment="Right"Background="Transparent"Command="{CreateTagCommand}"Content="{x:Static FontIcons.Add}"ToolTip="新建分类"/><FontIconButtonHeight="Auto"HorizontalAlignment="Right"Background="Transparent"Command="{ManageTagCommand}"Content="{x:Static FontIcons.Setting}"ToolTip="管理分类"/></DockPanel></ControlTemplate></h:Cattach.CaptionRightTemplate><h:TagBoxTags="{Binding Collection.SelectedItem.Model.Tags, Mode=TwoWay}"/></h:OutlookSection><h:OutlookSectionCattach.Icon="{x:Static FontIcons.FavoriteStarFill}"Header="设置收藏夹"Visibility="{Binding Source={x:Static h:IocProject.Instance}, Path=Current.Setting.UseFavoritePath, Converter={x:Static h:Converter.GetTrueToVisible}}"><h:FavoriteBoxCattach.TopTemplate="{x:Null}"SelectedFavoritePath="{Binding Collection.SelectedItem.Model.FavoritePath, Mode=TwoWay}"/></h:OutlookSection></h:OutlookBar.Sections></h:OutlookBar>