1 Star 0 Fork 0

程序员ken/IT-Roadblock

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
MainWindow.xaml 3.02 KB
一键复制 编辑 原始数据 按行查看 历史
程序员ken 提交于 2024-06-01 20:45 . 优化
<Window x:Class="IT_RoadBlock.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:controls="clr-namespace:IT_RoadBlock.Controls"
WindowStartupLocation="CenterScreen" ResizeMode="NoResize"
mc:Ignorable="d" x:Name="mainWindow"
Title="IT路障" Height="700" Width="1200" MaxHeight="700" MaxWidth="1200"
Icon="pack://application:,,,./Icons/logo.ico"
>
<Window.Resources>
<!-- 81a70a4910b30e40ea6e16060020 -->
<Style x:Key="SelectedListBoxItemStyle" TargetType="ListBoxItem">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="LightBlue"/>
<!-- 选中时的背景色 -->
<Setter Property="BorderBrush" Value="DeepSkyBlue"/>
</Trigger>
</Style.Triggers>
</Style>
<!-- 其他资源,如WrapPanelVerticalListBox样式和BubbleTailGeometry资源 -->
</Window.Resources>
<Grid x:Name="allGrid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"></ColumnDefinition>
<ColumnDefinition Width="6.8*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<ListBox Margin="10" Grid.Column="0" ItemsSource="{Binding Datas}" ItemContainerStyle="{StaticResource SelectedListBoxItemStyle}" SelectedIndex="{Binding SelectIndex,UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderThickness="1"
BorderBrush="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}, Path=BorderBrush}"
Background="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}, Path=Background}" Margin="0,5">
<DockPanel LastChildFill="True" HorizontalAlignment="Center">
<Path DockPanel.Dock="Left" Fill="YellowGreen" Width="20" Margin="10,10,10,0" HorizontalAlignment="Center"
Data="{DynamicResource AlignVCenterGeometry}"></Path>
<TextBlock Padding="10" Text="{Binding Name}" TextAlignment="Center" HorizontalAlignment="Center"></TextBlock>
</DockPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Frame Grid.Column="1" x:Name="mainContent" NavigationUIVisibility="Hidden">
</Frame>
</Grid>
</Window>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ten-ken/it-roadblock.git
git@gitee.com:ten-ken/it-roadblock.git
ten-ken
it-roadblock
IT-Roadblock
master

搜索帮助